-
Notifications
You must be signed in to change notification settings - Fork 76
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
Check meta before adding new custom section #1707
Conversation
a27c334
to
61438e5
Compare
61438e5
to
58fa0bc
Compare
Update: added a test to reproduce, have been trying to delete a wasm file in |
Thank you for adding that test @Ifropc! |
This fix appears to address the symptom, avoid adding new meta when the meta is already, rather than addressing the issue that when building on linux without changes the .wasm file doesn't seem to be rewritten. I think we need to further understand what's going on and why before we patch this at another level. It's also occurred to me while rereading this code that the cli is writing a whole new section per entry, but it should be joining the new entries together and writing them in one new entry, otherwise the wasm is unnecessarily larger due to managing one section per meta. As an optimisation I think this change would be worthwhile, but after addressing the second paragraph above because as part of addressing it, it'll need to be solved a different way. |
BTW the current fix doesn't work because it only checks for meta in the wasm file with the same name. (So specifying a different name after recompiling will keep old irrelevant meta). Ideally it shouldn't even be there in a first place, and I'm looking into why it's there, though it seems that it might be coming somewhere from cargo/rustc itself |
Good call - that makes sense. I'll close this PR as we understand the root cause.
Good point! Does it make sense to create a new issue for this? |
Opened a new issue: |
What
Closes #1694
Why
[TODO: Why this change is being made. Include any context required to understand the why.]
Known limitations
[TODO or N/A]