-
Notifications
You must be signed in to change notification settings - Fork 41
Add rust-toolchain.toml
file
#315
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 rust-toolchain.toml
file
#315
Conversation
093bea0
to
680e66a
Compare
063c514
to
156e33f
Compare
156e33f
to
60d2601
Compare
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.
cACK 60d2601
I wonder if we should add the targets meant for cross-compilation too.
60d2601
to
f09c4ae
Compare
If I understand correctly, this would install all those targets for all devs cloning and building the repo, which doesn't seem optimal to me. Mind you they won't make cargo attempt to build for all those targets, only that they are downloaded/available. But as is, the file is more of a convenience for contributors and users, only ensuring the library will build, format, and lint consistently if no other arguments superceding the compiler version are set. This was an issue for me as my default toolchain is 1.85 (what we use to build the bindings), and compilation always fails because of an error about our use of an unstable library feature, the |
f09c4ae
to
aa6bea0
Compare
0cfd2a5
to
55a805b
Compare
55a805b
to
ab5a348
Compare
45aa94f
to
58cd1d1
Compare
The code coverage run fails but that's not related to this PR. I updated the description above, but re-posting here for visibility: In order to ensure the CI runs and the default versions devs build the library with (the one defined in
I also bumped the checkout action to its latest v5 version (last commit). |
58cd1d1
to
ad61234
Compare
e45cb5b
to
ed34f13
Compare
7dedc67
to
d93b87b
Compare
53351b1
to
c6af44b
Compare
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.
utACK 6f140ed
ACK 6f140ed |
This addresses #314. It also incorporates the changes in #299.
The rust-toolchain.toml file is used to help contributors build, format, and clippy check the codebase using the same version of the Rust compiler. It can easily be overriden, but if no other arguments are supplied to commands like
cargo run
,cargo fmt
, andcargo clippy
, they will pick the version defined in this file.In order to ensure the CI runs and the default versions devs build the library with (the one defined in
rust-toolchain.toml
) stay in sync, a few changes were made to thecont_integration.yaml
workflow:Build & Test
job (and the 3-way matrix of (a) OS, (b) compilation features, (c) Rust version) into 2 different jobs. This is IMO easier for the eye to parse when looking at the workflow, and fully separate the testing of the MSRV and Stable into two separate jobs instead of a matrix of jobs with some extra of if/else stuff (for running the pinning script for example). The 2 jobs are now calledBuild & Test MSRV
andBuild and Test Stable
. Note that this makes it easier to see and understand the workflow in the GitHub UI.toolchain.toml
file by default. See their docs on this exact feature. This makes our workflows easy to work with: in the first job, we explicitly set the toolchain version to our MSRV, in the second we let the action download the toolchain defined in rust-toolchain.toml.I also bumped the checkout action to its latest v5 version (last commit).
close #314
close #299
Checklists
All Submissions:
just p
before pushing