Skip to content
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

Cargo opts #924

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Cargo opts #924

wants to merge 6 commits into from

Conversation

ijackson
Copy link

Hi. Here is a series let to the user influence the way wasm-pack runs cargo. Closes #923. Please see that issue for rationale and other options I considered.

I hope this meets with your approval. Please let me know what you think.

Template checklist

Make sure these boxes are checked! 📦✅

  • You have the latest version of rustfmt installed
$ rustup component add rustfmt
  • You ran cargo fmt on the code base before submitting
  • You reference which issue is being closed in the PR text

✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨

This lockfile seems very old and in a different syntax.  I need to
update parking_lot and cargo wants to update everything.

In my environment, the tests do the same thing before and after:
everything passes, except for
    test::it_can_find_a_webdriver_on_path
    test::it_can_run_browser_tests
which seem to be suffering some kind of problem with either my
installation or with an upstream service they use.

Signed-off-by: Ian Jackson <[email protected]>
I want to use parking_lot::const_rwlock, which is not available in
0.6.x.

Most of our dependencies seem to be on parking_lot 0.10, so let's use
that, even though parking_lot 0.11 exists.

Signed-off-by: Ian Jackson <[email protected]>
These may affect any subcommand that is interested.  Currently there
aren't any.

I experimented with passing a struct reference as a parameter
throughout the code, but that was extremely intrusive.

Signed-off-by: Ian Jackson <[email protected]>
Replace all open-coded instances of Command::new("cargo") with a call
to global_opts().  This will allow the global options to influence how
we run cargo.

No functional change at this stage.

I did a git grep for '"cargo"' to find all the occurrences.  One
open-coded instance remains, in tests/all/utils/fixture.rs.  This is
not part of wasm-pack; rather, it is test machinery, so it should not
try to use wasm-pack's global_opts().

Signed-off-by: Ian Jackson <[email protected]>
This allows passing some other program instead of cargo, such as a
cargo wrapper program.

Signed-off-by: Ian Jackson <[email protected]>
@ijackson
Copy link
Author

FTAOD these conflicts are due to #883. I am no longer using wasm-pack, but if it is being maintained and this MR is welcome, I could fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Would like a way to pass arguments to cargo, before "build"
1 participant