-
Notifications
You must be signed in to change notification settings - Fork 121
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
Ensure that the specified rustup toolchain exists before using it #388
Conversation
that's awesome. thanks a lot. |
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.
looks really great. i think we need to fix the tests as they are failing and we can fix them easily and make sure they run for all rust versions.
Codecov Report
@@ Coverage Diff @@
## 0.30.0 #388 +/- ##
==========================================
- Coverage 92.28% 92.02% -0.27%
==========================================
Files 86 86
Lines 17025 16993 -32
==========================================
- Hits 15711 15637 -74
- Misses 1314 1356 +42
Continue to review full report at Codecov.
|
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.
looks great. i have no more comments on my end, just lets fix those 3 lines so tests will pass on all channels and i'll merge this.
you have hardcoded nightly in the results instead of comparring with channel variable as those tests run in stable/beta as well.
Given a config like this [tasks.test] command = "cargo" args = [ "build" ] toolchain = "alarm" you get a fairly unintuitive error output like this: ``` [cargo-make] INFO - Running Task: test [cargo-make] ERROR - Error while executing command, exit code: 1 [cargo-make] WARN - Build Failed. ``` This can be quite confusing especially for people who are new to a project and might've missed installing the specified rustup toolchain before building the project with `cargo-make`. This patch ensures in the `toolchain`-subcrate that the toolchain actually exists (by checking the exit-code of `rustup run <toolchain> true`) before running the actual task. If the toolchain doesn't exist, an error like this will be thrown: ``` [cargo-make] INFO - Running Task: test [cargo-make] ERROR - Missing toolchain alarm! Please install it using rustup. [cargo-make] WARN - Build Failed. ```
thanks a lot for the PR. i'm merging it now. don't worry about the build errors, i'll resolve them. |
Given a config like this
you get a fairly unintuitive error output like this:
This can be quite confusing especially for people who are new to a
project and might've missed installing the specified rustup toolchain
before building the project with
cargo-make
.This patch ensures in the
toolchain
-subcrate that the toolchainactually exists (by checking the exit-code of
rustup run <toolchain> true
) before running the actual task. If the toolchain doesn't exist,an error like this will be thrown: