-
Notifications
You must be signed in to change notification settings - Fork 9
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
Downcast doesn't play nicely with minification #51
Comments
With rustwasm/wasm-bindgen#3554, it might no longer be necessary to play with |
A new release of |
Yes, though given we have custom |
This is going to be a blocker for full release of Element R, because normal builds use minified source. |
Do you need my help here? |
Any help would be much appreciated. At the moment, my ideas are:
|
Just for the record: We could have replaced (a) that's supposedly internal; (b) we don't need |
oh, in fact @Hywan's PR does exactly that in this instance: c556316#diff-dd97281cbaa3b13ed5a8dc4417797959632eed864b774977e013fc307dcc9f01L1002-R1012 |
There is also matrix-org/matrix-rust-sdk@main...MTRNord:matrix-rust-sdk:MTRNord/fix-binding-reflection which is based on wasmer code. However, afaik the repo for wasm-bindgen-downcast is still not public but the source on crates has a FOSS license as seen here: https://docs.rs/crate/wasm-bindgen-downcast/0.1.1/source/README.md The missing repo is at https://github.com/wasmerio/wasm-bindgen-downcast Thats how https://github.com/MTRNord/cetirizine is deployed (Also yes my fork is dated ^^ but I hope it gets the point across still) |
Thank you but we don't need an extra dependency. wasm-bindgen provides all the features we need. |
This function looks at constructor names to try to determine the right types. Specifically:
This may return an unexpected constructor name when minification has been used, as classes are renamed to shorter strings e.g
UserId
becomesNG
. This can then cause confusing errors:The text was updated successfully, but these errors were encountered: