-
Notifications
You must be signed in to change notification settings - Fork 411
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
Package collision in lockfile #413
Comments
Thanks! I can now also reproduce this with just Cargo, via |
Reporting back from the Cargo issue: Cargo currently doesn't really handle, or even have a way to handle, However, we never really wanted to be doing that anyway- Unfortunately |
i believe this should be fixed on master now? i'll be doing a release this week- but if you could check if you still see this on master, that'd be great! thanks for the detailed bug report and sorry for the delay in responding! i appreciate your patience |
Yes, I can confirm this is fixed on master. Thanks! |
🐛 Bug description
I'm building a crate that depends on a local crate twice- once directly and once transitively via another local crate. When I build with
wasm-pack
, I get an error from Cargo about a package collision in the lockfile. This error does not appear when building with Cargo directly.🤔 Expected Behavior
The build should succeed.
👟 Steps to reproduce
I've reduced the problem to this directory structure:
Here is
main/Cargo.toml
:Here is
dep_a/Cargo.toml
:Here is
dep_b/Cargo.toml
:The command
wasm-pack build
(from thewasm-bug/main/
directory) produces this error from Cargo:When I run Cargo directly with
cargo build --lib --release --target wasm32-unknown-unknown
(taken fromwasm-pack.log
) the build succeeds.The bug happens whether or not the crates are part of a workspace. (My original use case has them in a workspace; I removed it as part of the reduced repro above.)
I've also tried the workaround in #380 (comment), since it seemed potentially related, but it did not change things.
🌍 Your environment
wasm-pack version: 0.5.1
cargo version: 1.31.0-nightly (5dbac9888 2018-10-08)
I'm also on Windows, which may be relevant since I haven't tested this on Linux.
The text was updated successfully, but these errors were encountered: