From f1acca96e46f36b9ac14f94d2b97e8a5d939a1de Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 9 Jul 2026 17:17:56 -0400 Subject: [PATCH 1/2] chore: use Rust 1.97 cargo warnings --- justfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/justfile b/justfile index c2893a4..5101afa 100755 --- a/justfile +++ b/justfile @@ -8,12 +8,11 @@ binstall_args := if env('CI', '') != '' {'--no-confirm --no-track --disable-tele # location of the coverage output, used by CI coverage_lcov := 'target/llvm-cov/lcov.info' -# if running in CI, treat warnings as errors by setting RUSTFLAGS and RUSTDOCFLAGS to '-D warnings' unless they are already set +# if running in CI, treat warnings as errors by setting CARGO_BUILD_WARNINGS to 'deny' unless it is already set # Use `CI=true just ci-test` to run the same tests as in GitHub CI. -# Use `just env-info` to see the current values of RUSTFLAGS and RUSTDOCFLAGS +# Use `just env-info` to see the current value of CARGO_BUILD_WARNINGS ci_mode := if env('CI', '') != '' {'1'} else {''} -export RUSTFLAGS := env('RUSTFLAGS', if ci_mode == '1' {'-D warnings'} else {''}) -export RUSTDOCFLAGS := env('RUSTDOCFLAGS', if ci_mode == '1' {'-D warnings'} else {''}) +export CARGO_BUILD_WARNINGS := env('CARGO_BUILD_WARNINGS', if ci_mode == '1' {'deny'} else {'warn'}) export RUST_BACKTRACE := env('RUST_BACKTRACE', if ci_mode == '1' {'1'} else {'0'}) @_default: @@ -75,8 +74,7 @@ env-info: rustc --version cargo --version rustup --version - @echo "RUSTFLAGS='$RUSTFLAGS'" - @echo "RUSTDOCFLAGS='$RUSTDOCFLAGS'" + @echo "CARGO_BUILD_WARNINGS='$CARGO_BUILD_WARNINGS'" @echo "RUST_BACKTRACE='$RUST_BACKTRACE'" # Reformat all code `cargo fmt`. If nightly is available, use it for better results From d70169b15b28561ef1fa3ff2754a3de7c54c4105 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 9 Jul 2026 18:08:18 -0400 Subject: [PATCH 2/2] chore: ignore CARGO_BUILD_WARNINGS in cargo-install --- justfile | 1 + 1 file changed, 1 insertion(+) diff --git a/justfile b/justfile index 5101afa..c9200e4 100755 --- a/justfile +++ b/justfile @@ -168,6 +168,7 @@ assert-git-is-clean: cargo-install $COMMAND $INSTALL_CMD='' *args='': #!/usr/bin/env bash set -euo pipefail + unset CARGO_BUILD_WARNINGS if ! command -v $COMMAND > /dev/null; then echo "$COMMAND could not be found. Installing..." if ! command -v cargo-binstall > /dev/null; then