-
Notifications
You must be signed in to change notification settings - Fork 20
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
Importing JsValue
in a proc_macro
causes a compilation error on recent nightly's
#120
Comments
Is this a duplicate of #114? |
Almost certainly yes! |
…#121 This gets rid of the compile error: /usr/bin/ld: __wbindgen_realloc: undefined version: /usr/bin/ld: __wbindgen_malloc: undefined version: /usr/bin/ld: __wbindgen_free: undefined version: /usr/bin/ld: __wbindgen_exn_store: undefined version: /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status error: could not compile `stylist-macros` (lib) due to previous error This is just a test-verification of the below commit by @finnbear futursolo@9272103
I have submitted a pull request awaiting code review from @WorldSEnder. Until this is mitigated from stylist, there is a comment in the compiler regression issue about how to mitigate the impact by switching the linker to lld until Rust compiler is fixed. |
solution with lld doesn't work for me but adding this in Cargo.toml with rust 1.70 helps me to solve this issue [profile.dev.package.wasm-bindgen] |
* wip - creating next buttons for articles * wip marking user articles as started * marking user article complete when hitting the button * marking articles as completed at load * wip - marking the completed articles completed live and not just in database. Probably need to do an upsert or something else * marking articles as started and completed at the right times * fixed errors and warningsO * using latest ycl * fixed clippy warnings * running cargo check only on this library * fixing bug due to futursolo/stylist-rs#120 * using an older version of rust * fixed cargo formatting problem * fixed cargo formatting problem
Same error here, I can't compile stylist. |
After going back to rust 1.69, I can confirm that it is a version issue (it worked with 1.69) |
* Fix #120 - don't compile in JsValue in proc_macro. * Different approach - don't compile in JsValue outside wasm32. * Restore \n at EOF. * Use features to workaround proc macro linker error. * Fix browser tests. * Fix feature flags. * Update documentation. * Update documentation. * Adjust documentation. * Adjust documentation. * Adjust documentation. --------- Co-authored-by: Finn Bear <[email protected]>
Stylist v0.12.1 has been released, which should also mitigate this issue from within stylist. |
This current workaround has a couple requirements:
In addition, since Rust 1.72 has fixed this regression and this workaround is no longer needed, I do plan to remove the workaround. The current plan is once 1.72 has been released for 6 months, we bump the MSRV requirement to 1.72 to avoid this regression and remove the workaround. |
Thanks for the crate! I noticed a regression on recent Rust nightly's that causes a linker error when using stylist.
Rust regression issue: regression - nightly 2023-03-30 -> 2023-03-31 causes linker error when importing wasm_bindgen::JsValue in a proc_macro rust-lang/rust#111888
JsValue
inclusion:stylist-rs/packages/stylist-core/src/error.rs
Line 19 in fbd788f
(this type is later imported by
stylist-macros
but, as far as I know, this variant won't be constructed there)I'll work on a PR to see if
JsValue
can be removed forproc_macro
purposes.The text was updated successfully, but these errors were encountered: