Conversation
There was a problem hiding this comment.
Pull request overview
Adds a pinned Rust toolchain definition and wires the devcontainer/CI container build to use it so developers and automation build with a consistent Rust version.
Changes:
- Add
rust-toolchain.tomlpinning Rust1.94.0plus required components/targets. - Update CI container build to use repo-root build context (so the toolchain file can be copied into the image).
- Update devcontainer Dockerfile to install Rust based on
rust-toolchain.tomlrather than a hardcodedRUST_VERSION.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
rust-toolchain.toml |
Introduces the pinned Rust channel and required components/targets. |
.github/workflows/ci.yml |
Builds the devcontainer image from repo root context so the toolchain file is available during build. |
.devcontainer/Dockerfile |
Copies the toolchain file into the image and installs Rust accordingly; minor whitespace fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,4 @@ | |||
| [toolchain] | |||
| channel = "1.94.0" | |||
There was a problem hiding this comment.
Pinning the toolchain to Rust 1.94.0 will make the workspace fail to compile because xtasks/crates/config/src/lib.rs contains #[rustversion::since(1.94)] compile_error!(...) (lines 154-155). Either lower the pinned toolchain below 1.94 for now, or remove/resolve that compile_error! gate before enforcing 1.94 via rust-toolchain.toml.
| channel = "1.94.0" | |
| channel = "1.93.0" |
There was a problem hiding this comment.
I think we should merge this once the other branch that fixes this is merged
| uses: docker/build-push-action@v2 | ||
| with: | ||
| context: .devcontainer | ||
| context: . |
There was a problem hiding this comment.
With context: ., the container build will now pick up rust-toolchain.toml and install Rust 1.94; the workflow then runs just config/just cov, which compile cargo xtask and will hit the unconditional compile_error! for Rust >= 1.94 in xtasks/crates/config/src/lib.rs (154-155). This change will make CI fail unless that gate is removed or the pinned toolchain stays < 1.94.
| context: . | |
| context: .devcontainer |
There was a problem hiding this comment.
With context: ., the container build will now pick up rust-toolchain.toml and install Rust 1.94
That is the point of the PR, yes....
This PR creates a Rust toolchain file that is used as source of truth of Rust toolchains we need (in addition to the host one, and the nightly one downloaded by kani).
This ensures that everyone uses the same Rust version, as some branches already use 1.94 features, which gives very confusing build errors if you're on an older version.
Note that this will not work in CI for now due to some macros that intentionally fail compilation on 1.94 - the only thing we should care about is whether the container builds.
Fixes osiris#16 (gitlab)