-
Notifications
You must be signed in to change notification settings - Fork 30
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
Consider allowing newer versions of wasm dependencies #43
Comments
WebAssembly support was added in strawlab#38 targeting the current versions versions of wasm-bindgen and js-sys at the time, which is reasonable. Unfortunately the whoami crate, in trying to support older Rust versions, has reduced the upper version of wasm-bindgen that it supports, see ardaku/whoami#43. This PR thus reduces the minimum version required for wasm-bindgen. I used `cargo +nightly update -Z minimal-versions` with `cargo build --target wasm32-unknown-unknown` to find the earliest version that compiles. We could theoretically set up checks in CI to verify this on an ongoing basis, but this might be overkill for now.
@djc Thanks, I can see it will be important to revert this regression, although I'm currently not sure how to still test the MSRV of WASM in CI once reverted. I can probably figure something out, but if you have any ideas, it might save me some time. |
Thanks for the quick response! The opentelemetry project has a similar issue, see here: |
(You may have seen that I also submitted strawlab/iana-time-zone#58 to reduce its dependency on wasm-bindgen, but I still think it would be good to come up with a better solution here.) |
Thanks, I think something like this will work fine! I'll try to get to releasing a new patch version later today. |
WebAssembly support was added in #38 targeting the current versions versions of wasm-bindgen and js-sys at the time, which is reasonable. Unfortunately the whoami crate, in trying to support older Rust versions, has reduced the upper version of wasm-bindgen that it supports, see ardaku/whoami#43. This PR thus reduces the minimum version required for wasm-bindgen. I used `cargo +nightly update -Z minimal-versions` with `cargo build --target wasm32-unknown-unknown` to find the earliest version that compiles. We could theoretically set up checks in CI to verify this on an ongoing basis, but this might be overkill for now.
Just released whoami version 1.2.3 which fixes this. |
Thanks! |
In #38 you constrained the allowed versions for wasm-bindgen:
However, this means that all transitive downstream dependencies are no longer allowed to depend on newer wasm-bindgen, which seems like a bad idea. If you want to test support for older MSRVs, it's probably worth downgrading your wasm-bindgen versions explicitly in the CI job instead of constraining the upper allowed version.
For example, I ran into this because I'd like to use chrono 0.4.22 (the latest version). I happen to have a transitive dependency on whoami through sqlx-core, which I wasn't aware of before today. Therefore, Cargo silently downgraded my chrono dependency as I pulled in, since chrono depends on iana-time-zone, which recently started depending on wasm-bindgen and (reasonably) requires the current version at the time (0.2.81).
This is an issue in particular for wasm-bindgen, because it is set up to be treated as a native library, which means only one version is allowed to be linked. Here's the error I get when I try to force usage of chrono 0.4.22:
So I would like to request you reconsider how you support older MSRVs.
The text was updated successfully, but these errors were encountered: