Skip to content

Commit

Permalink
dev: pin exact rust nightly version (#2365)
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy authored Aug 29, 2024
1 parent 061a6ef commit e89ac13
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/rust_fmt.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

cargo +nightly fmt --check --all -- "$@"
cargo +nightly-2024-08-28 fmt --check --all -- "$@"

0 comments on commit e89ac13

Please sign in to comment.