-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file_packager files if source pathname contains @ sign #15947
Comments
Sounds reasonable to me. I suppose this assumes that the target of the preload doesn't contains a |
We don't need to support @ in the target portion of preload, just in the source portion. So that restriction is okay. |
Oh wait, it looks like we already support @ via escaping:
Can you use that method to escape them? |
Not readily. The source path is provided to us at build time in ninja. Might be possible if we wrote a wrapper script instead of invoking file_packager directly, but I would be reluctant to add that step. |
Just trying to understand here: It seems like you are constructing Of course we could flip the logic to allow unescaped |
Ah, our actual config file for generating the build contains The PRODUCT_DIR is the full path provided by CI. CI is generating the |
And you can't do something like |
No, we don't have an escape mechanism. I'd have to write a separate python file to invoke file_packager. Would it make sense to provide new args |
I think your suggested change to file packager should be harmless enough. I was mostly curious why its wasn't easy to do the escaping on your end, but I guess not easy in cmake. |
This means that `@@` escaping is optional for the targets rather than the source. Fixes #15947
This means that `@@` escaping is optional for the targets rather than the source. Fixes #15947
Fix is in #15980 |
I am somewhat concerned about this being a breaking change. It's hard to tell if there are current users that depend on the behavior we have right now, but it's possible. It seems symmetrical to support an unescaped Alternatively, |
Adding more arguments, especially ones which are inherently linked together doesn't seem great to me. How about a third way: We introduce another possible separator
This would only break if somebody wanted to include a file with two colon in the name... which seems likely.. but I guess not impossible. Since |
Interesting idea. I like the possible convergence of conventions across tools. However, a second separator still keeps the risk of breakage of existing users. Perhaps the windows argument has some weight, but I would not be surprised if many of our devs use only mac or linux. Sadly I checked and |
This means that `@@` escaping is optional for the targets rather than the source. Fixes #15947
Our CI system generates pathnames with @ in them. But, the file_packager uses @ in the
--preload
command line arg. The file_packager is not able to handle this case. E.g, we end up with args like:--preload {root_path}@{folder_path}Required@/data/Required
My suggested fix is to change this line of code to use
rfind
instead offind
. I have tested and verified this fix in our CI system.emscripten/tools/file_packager.py
Line 240 in 1a623ed
The text was updated successfully, but these errors were encountered: