[file_packager] Allow negative patterns in exclude argument#26251
[file_packager] Allow negative patterns in exclude argument#26251arsnyder16 wants to merge 2 commits intoemscripten-core:mainfrom
Conversation
sbc100
left a comment
There was a problem hiding this comment.
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.
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