-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Upgrade to Rust 1.86 and bump MSRV to 1.84 #17171
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
Conversation
|
|
crates/red_knot_python_semantic/src/module_resolver/typeshed.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Alex Waygood <[email protected]>
op: Operator::Mod { .. }, | ||
op: Operator::Mod, |
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.
Interesting, is this now allowed or was it always allowed and I wasn't aware of it? i.e., matching against an enum struct variant without specifying the fields.
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.
Operator::Mod
has no fields. But it seems that Rust still allows you to use { .. }
in that case because that also matches "no-fields"
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.
I see and I'm guessing that it's the same for other struct variants for which the { .. }
was removed in this PR.
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.
Nice! Sorry for the late review. I was in the middle of reviewing this when I scratched my cornea, so I figured I'd finish it haha.
&mut output, | ||
"Derived from the **{}** linter.", | ||
linter.name() | ||
); |
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.
I kinda wonder if we should propose add something to std
to make this nicer. I like the way the x.push_str(&format!("..."))
construction reads much nicer, but I guess this approach avoids an intermediate allocation. But this approach has the very ugly let _ = ...;
construction.
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.
That would be great. I definitely don't love it and it has the downside that later refactoring the code to eg use a Write instead of a string now incorrectly suppresses errors (instead of Rust telling you that this might now fail)
* origin/main: [red-knot] Add `Type::TypeVar` variant (#17102) [red-knot] update to latest Salsa with fixpoint caching fix (#17179) Upgrade to Rust 1.86 and bump MSRV to 1.84 (#17171) [red-knot] Avoid unresolved-reference in unreachable code (#17169) Fix relative import resolution in `site-packages` packages when the `site-packages` search path is a subdirectory of the first-party search path (#17178) [DO NOT LAND] bump Salsa version (#17176) [syntax-errors] Detect duplicate keys in `match` mapping patterns (#17129)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary I decided to disable the new [`needless_continue`](https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue) rule because I often found the explicit `continue` more readable over an empty block or having to invert the condition of an other branch. ## Test Plan `cargo test` --------- Co-authored-by: Alex Waygood <[email protected]>
Hello, I'd like to know what the motivation to pin the Rust version to the latest release in |
We're aware that always using the latest version is challenging for downstream packagers. That's why we only use the latest Rust version for local development (and in our release pipelines) but maintain backwards compatibility with I think what you're running into is that you clone Ruff's repository and invoke I understand is that you want to use a different Rust version. You have a few options:
You can use any rust version that's compatible with our MSRV (1.84 today). It can be newer or older than the version in our I hope this helps |
Hmm, have you considered adopting the latest & greatest primarily in nightly CI builds to get early feedback on new stuff but move the upstream dependency on a slower pace to essentially not "test in production" and by production means all local dev setups? Kinda what Fedora Rawhide is for and commonly consumed in projects' CIs.
Our use case is actually quite different (ties to
We may actually consider some of ^this, thanks for the pointer, I admit I didn't pay thorough attention when reading https://rust-lang.github.io/rustup/overrides.html before dropping a comment on this PR. That said, if you say that |
I think that makes sense |
I created #17909. I'm trying to figure out why we included it in the first place. |
Summary
I decided to disable the new
needless_continue
rule because I often found the explicitcontinue
more readable over an empty block or having to invert the condition of an other branch.Test Plan
cargo test