Skip to content
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

add a rust-toolchain.toml to pin the rust version? #10256

Closed
asukaminato0721 opened this issue Jan 24, 2024 · 1 comment
Closed

add a rust-toolchain.toml to pin the rust version? #10256

asukaminato0721 opened this issue Jan 24, 2024 · 1 comment

Comments

@asukaminato0721
Copy link
Contributor

I've checked the issues, no relevant issues.

I noticed that

# This used to have --deny=warnings, but that turns rust release day
# into automatic CI failure day, so we don't do that.
run: cargo clippy --workspace --all-targets

so manually pin a version will fix that. (But require manually bump the toolchain version, which is not so frequently).

something like

[toolchain]
# older versions may fail to compile; newer versions may fail the clippy tests
channel = "1.75"
components = ["rustfmt", "clippy"]

ref https://rust-lang.github.io/rustup/overrides.html

@krobelus
Copy link
Member

to build the software we don't want to force users to install a specific version of Rust. Any Rust >= 1.66.0 should work.
Between normal CI builds and asan we already test 1.67.0 and nightly, and we clippy-check stable.

Clippy and rustfmt checks should either

  • not be pinned but follow stable Rust. This means that we want to allow warnings (current state)
  • be pinned, then they can fail on warnings.

The second would require developers use a pinned version, and use clippy.

See also the typical use case for rust-toolchain.toml which is not ours:

Some projects find themselves 'pinned' to a specific release of Rust and want this information reflected in their source repository. This is most often the case for nightly-only software that pins to a revision from the release archives.

@krobelus krobelus added this to the will-not-implement milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants