You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build documentation suggests that you can pass extra flags to cargo build. The example given is --offline. A natural inference for a user is that --locked should work too.
In fact, neither are passed to cargo metadata, making neither --locked nor --offline behave the way they would if the user were calling cargo build --locked.
🤔 Expected Behavior
When calling wasm-pack build -- --locked, wasm-pack should not manipulate lockfiles at all, just like cargo build --locked. I believe all that is needed is to feed the extra cargo options into the cargo_metadata::MetadataCommand constructor alongside the manifest path. This is done in CrateData::new in manifest/mod.rs.
👟 Steps to reproduce
Delete your Cargo.lock.
Run `wasm-pack build -- --locked
Check whether the command succeeded and created a Cargo.lock file.
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.10.3
rustc version: 1.71
The text was updated successfully, but these errors were encountered:
Even --offline isn't passed to cargo build: #821
This feature is critical if you want to use wasm-pack in a nix derivation as they are isolated on purpose.
EDIT: I take this back. The problem is that wasm-pack build runs both cargo build, which is now passed extra parameters, and cargo install that you have no control over.
🐛 Bug description
The build documentation suggests that you can pass extra flags to
cargo build
. The example given is--offline
. A natural inference for a user is that--locked
should work too.In fact, neither are passed to
cargo metadata
, making neither --locked nor --offline behave the way they would if the user were callingcargo build --locked
.🤔 Expected Behavior
When calling
wasm-pack build -- --locked
,wasm-pack
should not manipulate lockfiles at all, just likecargo build --locked
. I believe all that is needed is to feed the extra cargo options into thecargo_metadata::MetadataCommand
constructor alongside the manifest path. This is done inCrateData::new
in manifest/mod.rs.👟 Steps to reproduce
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.10.3
rustc version: 1.71
The text was updated successfully, but these errors were encountered: