-
Notifications
You must be signed in to change notification settings - Fork 422
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
(WIP) Use Cargo.lock
to identify wasm-bindgen version.
#302
Conversation
Unrelated, but of note: I've had a lot of trouble running the test bench on my machine. Admittedly, this might be a resources problem (< 4Gb RAM), but it might be worth thinking about in the future for other contributors :)
|
8247c51
to
5813428
Compare
When running the wasm-pack tests, I've had issues that I think boil down to doing lots of I/O on encrypted disks on linux but I'm not totally sure. I have low CPU usage, low mem usage, and yet my system is super janky. Not totally sure what's up. If you think you might have similar problems, I'd love to hear more. Or just generally what appears to be the bottleneck for you: CPU, memory, etc and how you determined that (eg looking at an activity monitor while running tests or using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good @data-pup :)
More cases we can handle now and should have tests for:
-
running
wasm-pack build
in each crate within an umbrella workspace:umbrella/ - Cargo.toml # just have `[workspace] members = [..]` - foo/ - Cargo.toml - src/ - lib.rs - bar/ - Cargo.toml - src/ - lib.rs
-
a dependency uses
wasm-bindgen
, but the root crate does not:// child/src/lib.rs extern crate wasm_bindgen; use wasm_bindgen::prelude::*; #[wasm_bindgen] pub fn hello() -> u32 { 42 } // parent/src/lib.rs extern crate child; pub use child::*;
toml::from_str(&lockfile).map_err(Error::from) | ||
} | ||
|
||
/// Given the path to the crate that we are buliding, return a `PathBuf` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"buliding" -> "building"
Awesome, thanks so much for the help/review everyone! I'll spend some more time on this PR this week, and should hopefully have it finished up by Friday at the latest. 😸 |
BTW, make sure that you delete any |
Fixes #270. This aims to find the wasm-bindgen version using the lockfile.
Note: This is still a WIP, and should probably land after #271. While working on this, I ran into some of the same problems that were solved by that PR, so I tried to remove any duplicate work. I can rebase this once that lands, but review/feedback is welcome in the meantime :)
Make sure these boxes are checked! 📦✅
rustfmt
installed and have yourcloned directory set to nightly
$ rustup override set nightly $ rustup component add rustfmt-preview --toolchain nightly
rustfmt
on the code base before submitting✨✨ 😄 Thanks so much for contributing to wasm-pack! 😄 ✨✨