rustPlatform.cargoSetupHook: allow all lints#225938
rustPlatform.cargoSetupHook: allow all lints#225938winterqt wants to merge 1 commit intoNixOS:stagingfrom
Conversation
We've had multiple occurrences of packages that don't compile after a rustc bump due to new lints. Let's stop this once and for all, by using rustc's lint capping feature [0]. [0]: https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
|
Maybe "allow all lints when compiling" is better. |
+1 for me, but does that mean it would have to be in all of |
|
I'm operating under the assumption that people will be dragging in |
|
no I think the assumption is good, I thought you were worried that having this in |
|
Another worry I have is this might overwrite |
Oh, I was just talking about the commit message, hence the quotes. cc @alyssais for the TOML stuff -- should we be setting this somewhere else? |
|
Not a fan of this.
Could you paste some links of them? To me,
|
|
Is there a way we could disable Regardless, we definitely shouldn't use RUSTFLAGS to do it, but maybe there's some other way we could do it. And we could definitely do it when we have the much-anticipated Rust compiler wrapper that everybody seems to have accepted is coming eventually. |
I find this env var:
|
|
I was just talking to @estebank,who's on the Rust compiler team. He says that he doesn't think there's currently a flag that would allow us to override So, I'd like to reframe the discussion here a little bit: leaving aside what's currently possible with the Rust tooling, what would our ideal situation be? Would it be to drop denials from crates, but leave default denials from the compiler intact, or would it be something else? |
I'm lean towards not ignoring this globally. When we encountering a |
|
I think we've come to a consensus that this isn't the best way forward. I guess I can file a ticket on the Rust side like @alyssais mentioned. |
|
Amongst some people in the Rust side, we've had discussions about annotating lints with metadata on which version they were introduced/most recently significantly modified, and then providing a way to cap lints in a version aware way. This would allow a project to say "deny all lints that existed on rust 1.90 (but hard cap any lints introduced after that to warn only)". I believe this feature would work for your usecase. Sadly, I don't think I've filed an MCP/RFC for this yet and don't know how quickly the feature could be stabilized. If someone is interested on doing the work, I can help by mentoring through the process of proposing and implementing it. |
We've had multiple occurrences of packages that don't compile after a rustc bump due to new lints. Let's stop this once and for all, by using rustc's lint capping feature 0.
Description of changes
Things done
nix-build -A fdsandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)