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

feat(build): add rustc check #353

Merged
merged 8 commits into from
Sep 24, 2018
Merged

feat(build): add rustc check #353

merged 8 commits into from
Sep 24, 2018

Conversation

ashleygwilliams
Copy link
Member

@ashleygwilliams ashleygwilliams commented Sep 24, 2018

fixes #351

@ashleygwilliams ashleygwilliams added the work in progress do not merge! label Sep 24, 2018
@ashleygwilliams ashleygwilliams added this to the 0.5.0 milestone Sep 24, 2018
@ashleygwilliams ashleygwilliams added needs tests please add tests to this PR needs docs please add docs to this PR labels Sep 24, 2018
@ashleygwilliams ashleygwilliams force-pushed the rustc-version-check branch 2 times, most recently from e41850c to 8fa264c Compare September 24, 2018 18:51
@ashleygwilliams ashleygwilliams removed the needs docs please add docs to this PR label Sep 24, 2018
Cargo.toml Outdated
@@ -19,6 +19,7 @@ indicatif = "0.9.0"
lazy_static = "1.1.0"
openssl = { version = '0.10.11', optional = true }
parking_lot = "0.6"
rustc_version = "0.2.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW using this crate can be problematic sometimes until djc/rustc-version-rs#11 has been fixed, and in general determining just the minor version of rustc is pretty lightweight

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! and good to know. happy to do it without the crate.

@ashleygwilliams ashleygwilliams force-pushed the rustc-version-check branch 2 times, most recently from e59c95a to 0ace242 Compare September 24, 2018 20:54
@ashleygwilliams ashleygwilliams removed needs tests please add tests to this PR work in progress do not merge! labels Sep 24, 2018
@ashleygwilliams ashleygwilliams changed the title [WIP] feat(build): add rustc check feat(build): add rustc check Sep 24, 2018
@ashleygwilliams
Copy link
Member Author

chatted with @alexcrichton and we are gonna punt on testing this at the moment. it's tricky and it's probably best to just test the binary which will require a bunch of work and prevent the release today. i'll test manually to ensure it works as expected and prioritize the testing strat for this week and next release

@ashleygwilliams
Copy link
Member Author

currently i can only get it to this:

| [1/9] 🎯  Checking `rustc` version...
We can't figure out what your Rust version is- which means you might not have Rust installed. Please install Rust version 1.30.0 or higher.

test strategy - compile in beta or nightly, override set stable, ./target/debug/wasm-pack build

@ashleygwilliams
Copy link
Member Author

ok, this works locally for me

| [1/9] 🦀  Checking `rustc` version...
Your version of Rust, '29', is not supported. Please install Rust version 1.30.0 or higher.

@ashleygwilliams
Copy link
Member Author

i might fix it to log the full version cuz that 29 looks weird

Copy link
Contributor

@mgattozzi mgattozzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

127 michael@eva-03 ~/Code/wasm-pack (git)-[rustc-version-check] % cargo run -- build                              :(
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target/debug/wasm-pack build`
| [1/9] 🦀  Checking `rustc` version...
Your version of Rust, '29', is not supported. Please install Rust version 1.30.0 or higher.
1 michael@eva-03 ~/Code/wasm-pack (git)-[rustc-version-check] % PATH="" ./target/debug/wasm-pack build            :(
| [1/9] 🦀  Checking `rustc` version...
We can't figure out what your Rust version is- which means you might not have Rust installed. Please install Rust version 1.30.0 or higher.

Verified this works as intended! Great work Ashley!

@ashleygwilliams ashleygwilliams merged commit d5d3358 into master Sep 24, 2018
@ashleygwilliams ashleygwilliams deleted the rustc-version-check branch September 24, 2018 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

check that rust is installed, is above 1.30, or err, before all steps
3 participants