-
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
Clippy get's installed every time #239
Comments
thanks!!! you are right. |
@lukasschlueter can you check 0.19.4 branch to see if it resolves the issue? |
Yes, that seems to work, thanks for the quick fix! |
great, will publish a new version with the fix soon |
We are also facing this issue and while investigating, I looked at the current default Makefile. May I suggest a change to this section here? cargo-make/src/lib/Makefile.stable.toml Lines 434 to 440 in d0cedd1
If I understand correctly, this means clippy will always be installed through GitHub if you are on nightly. We not try to install it through rustup first and if that one doesn't work, install it through GitHub? |
Workaround for: sagiegurari/cargo-make#239.
will check it out. problem with rustup and clippy on nightly is that its not available but can have it try it first |
@thomaseizinger changing to: install_crate = { crate_name = "clippy", rustup_component_name = "clippy", binary = "cargo-clippy", test_arg = "--help" } full task definition: [tasks.install-clippy-any]
description = "Installs the latest clippy code linter via cargo install via rustup or directly from github."
category = "Test"
install_crate = { crate_name = "clippy", rustup_component_name = "clippy", binary = "cargo-clippy", test_arg = "--help" }
install_crate_args = ["--git", "https://github.com/rust-lang/rust-clippy/"]
args = [ "clippy", "--help" ]
[tasks.install-clippy-rustup]
description = "Installs the clippy code linter via rustup."
category = "Test"
install_crate = { rustup_component_name = "clippy", binary = "cargo-clippy", test_arg = "--help" }
[tasks.install-clippy]
description = "Installs the clippy code linter."
category = "Test"
run_task = [
{ name = "install-clippy-any", condition = { channels = ["nightly"] } },
{ name = "install-clippy-rustup" }
] should resolve it. |
@thomaseizinger @lukasschlueter I pushed the updated clippy task to the 0.19.4 branch. |
Looks good to me. |
I am not going to be able to test it until Monday but if that definition tries it in the following order, that seems fine with me:
|
ya that's the order for nightly. |
0.19.4 has been officially released. |
Tested and works! |
thanks for confirming |
Describe the bug
Starting with v0.19.3, running
cargo make ci-flow
always tries to install the latest clippy from the github repository and doesn't care if clippy is already installed.This leads to a break as clippy does currently not build for the latest nightly.
Also, according to #236 (comment), it should try to install using rustup if
cargo install
fails, which also does not seem to happen.So I think there are actually two bugs:
cargo install
fails,rustup component add clippy
is not getting triedTo Reproduce
Steps to reproduce the behavior:
nightly-2019-05-22
which has the clippy component:rustup default nightly-2019-05-22
rustup component add clippy
CARGO_MAKE_RUN_CLIPPY=true cargo make ci-flow
orcargo make install-clippy
for a minimal exampleError Stack
Workaround
For possible bug 1, I found a workaround by adding this to
Makefile.toml
:This tries to run
cargo clippy -V
(getting the version), discard all output (so not to distract when running) and "inverts" the success of the command.I can open a PR with this if you'd want, but I'm not sure if this is the best solution.
Checking for
$CARGO_HOME/bin/cargo-clippy
is not guaranteed to work as$CARGO_HOME
does not seem to be required.The text was updated successfully, but these errors were encountered: