From e89ac13c90d7eab016a914610c34780f11db9e31 Mon Sep 17 00:00:00 2001 From: Ammar Arif Date: Thu, 29 Aug 2024 18:33:37 -0400 Subject: [PATCH] dev: pin exact rust nightly version (#2365) --- .devcontainer/Dockerfile | 8 +++++--- scripts/clippy.sh | 2 +- scripts/rust_fmt.sh | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ef9a9a324d..32fe7261de 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -27,6 +27,8 @@ ENV TABLEGEN_170_PREFIX=/usr/lib/llvm-17 # To allow independent workflow of the container, the rust-toolchain is explicitely given. RUN echo "1.80.0" > rust_toolchain_version +# Make sure to sync the nightly version with the scripts in ./scripts +RUN echo "nightly-2024-08-28" > nightly_rust_toolchain_version # Install cargo-binstall RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash @@ -36,8 +38,8 @@ RUN rustup toolchain install $(cat rust_toolchain_version) && \ rustup component add clippy && \ rustup component add rustfmt -RUN rustup toolchain install nightly && \ - rustup component add rustfmt clippy --toolchain nightly +RUN rustup toolchain install $(cat nightly_rust_toolchain_version) && \ + rustup component add rustfmt clippy --toolchain $(cat nightly_rust_toolchain_version) RUN rustup target add x86_64-pc-windows-msvc && \ rustup target add wasm32-unknown-unknown @@ -60,7 +62,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \ rm -r hurl-4.1.0-x86_64-unknown-linux-gnu && \ rm hurl.tar.gz && \ rustup component add llvm-tools-preview --toolchain $(cat rust_toolchain_version)-x86_64-unknown-linux-gnu && \ - rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly; \ + rustup target add x86_64-fortanix-unknown-sgx --toolchain $(cat nightly_rust_toolchain_version); \ fi ARG DOJO_VERSION=stable diff --git a/scripts/clippy.sh b/scripts/clippy.sh index 8b3cdbc299..43f9b5f208 100755 --- a/scripts/clippy.sh +++ b/scripts/clippy.sh @@ -8,7 +8,7 @@ set -x set -o pipefail run_clippy() { - cargo +nightly clippy --all-targets "$@" -- -D warnings -D future-incompatible -D nonstandard-style -D rust-2018-idioms -D unused -D missing-debug-implementations + cargo +nightly-2024-08-28 clippy --all-targets "$@" -- -D warnings -D future-incompatible -D nonstandard-style -D rust-2018-idioms -D unused -D missing-debug-implementations } run_clippy --all-features --workspace diff --git a/scripts/rust_fmt.sh b/scripts/rust_fmt.sh index 62a418693a..db5636de2e 100755 --- a/scripts/rust_fmt.sh +++ b/scripts/rust_fmt.sh @@ -1,3 +1,3 @@ #!/bin/bash -cargo +nightly fmt --check --all -- "$@" +cargo +nightly-2024-08-28 fmt --check --all -- "$@"