-
Notifications
You must be signed in to change notification settings - Fork 21
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
Dylint relies on rustup #452
Comments
Hi, @GoldsteinE. I'm sorry this isn't working for you. I want to help you get this resolved. Can I confirm, you are running these commands?
From within the
|
Yes, I’m running these commands. $ uname -a
Linux think 5.19.5 #1-NixOS SMP PREEMPT_DYNAMIC Mon Aug 29 09:18:05 UTC 2022 x86_64 GNU/Linux
$ cargo dylint --version
cargo-dylint 2.0.12
$ cat Cargo.toml
[package]
name = "lint_name"
version = "0.1.0"
authors = ["authors go here"]
description = "description goes here"
edition = "2021"
publish = false
[lib]
crate-type = ["cdylib"]
[dependencies]
clippy_utils = { git = "https://github.com/rust-lang/rust-clippy", rev = "2b2190cb5667cdd276a24ef8b9f3692209c54a89" }
dylint_linting = "2.0.12"
if_chain = "1.0.2"
[dev-dependencies]
dylint_testing = "2.0.12"
[package.metadata.rust-analyzer]
rustc_private = true
|
I suspect that's the source of the problem. Each Could you try Is using rustup not an option for you? |
Using rustup is not an option for me, but I can try specific nightly version. In general I’d prefer for |
The current behavior is by design. The problem is that the compiler APIs can change. So just like a In other words, if Dylint used the installed nightly, the following could happen. A lint builds fine. Then the developer updates their toolchain. Then the lint ceases to build. The current setup is meant to avoid this possibility. |
I should say, one can do this---there's nothing in Dylint that prevents using the installed toolchain. But doing so could be painful, for the reason given. |
I changed the toolchain to one in |
UI tests seem to be completely unusable without |
I just want to ensure that the current If you would like to propose ideas here before implementing, you would be welcome to. |
I need to get a look at the source code first, but generally I think that when rustup is not found, dylint should fall back to more general solutions (like |
On the face of it, that sounds perfectly reasonable. |
|
clippy_utils
due to 520 previous errors
Using a built in rustup would certainly be better. It'd still install a second copy of Rust, even if system Rust already has the right version. |
Related: rust-lang/rust-clippy#7261 |
@GoldsteinE I've attached a I was seriously considering linking in Experience has taught me that having a large number of dependencies can be bad. Until version 3.0.0, Dylint linked in The number of dependencies that So, again, thank you very much for raising the issue. But, for now, I think the best course of action is to rely on |
I think this is the same story: There is one case where I find relying on |
I can't seem to reproduce this. I agree that would be excessive, though. Are you using a recent version of |
Ah. I agree that should not happen. Thanks for reporting. I'll get it fixed. |
Doing
cargo dylint new lint-name
, trying to implement a new lint and runningcargo build
produces enormous amount of errors inside ofclippy
.The text was updated successfully, but these errors were encountered: