-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[file_packager] Allow negative patterns in exclude argument #26251
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
base: main
Are you sure you want to change the base?
[file_packager] Allow negative patterns in exclude argument #26251
Conversation
sbc100
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find the double negative here fairly hard to understand/explain.
Would it be maybe in these more complex cases to write a script to prepare you assets?
e.g.
$ ./prepare_assets.py assets/ files/
$ ./emcc --embed-files files
test/test_other.py
Outdated
| self.run_process([EMCC, 'main.c', '--embed-file', 'tst', '--exclude-file', '*.exe']) | ||
| self.assertEqual(self.run_js('a.out.js').strip(), '') | ||
|
|
||
| def test_exclude_file_negative(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you call these test_file_packager_exclude_file...?
|
Yes this what I do today but it just creates a duplicate which is not ideal This follows the flow of say .gitignore, that was another thought I had was look for say .emscriptenignore |
|
I think I'm a little wary of adding more complexity here. It seems like a fairly niche case that can be solved using an external script. Is the local duplication of assets during a build a problem for you? Are these file huge? (Maybe you could use symlinks instead of copies, unless you on windows?) |
|
Yea this didn't jar me as complex, especially since it's additive, but if it's too much we could close |
|
This plays a little with #24802 Where I an trying to keep my artifact bundle size down for my automated tests If there was a way to lazy load files through emrun it would solve all of this |
|
Its not clear to me the status of WasmFS but there seemed to be some potential hope there where a server or local FS could work more like an NFS drive than needing to bundle and extract the whole FS |
This enables a little more flexibility to what is and isn't excluded when packaging files.
In my scenario i have a semi large folder structure i would like to bundle but i need most files included but a few variant files i want to ignore so keep the .data file smaller.
only include png(s) that are specific to wasm