From a6216f0104f30f6be4b2a97c25ffee39aa6fe80c Mon Sep 17 00:00:00 2001 From: Christian Schilling Date: Fri, 20 Oct 2023 15:02:43 +0200 Subject: [PATCH] Use define instead of #![deny(warning)] Setting #![deny(warnings) in the source can cause josh fail to build on different versions of rustc. This way we only ensure there are no warnings on our "officially supported" rustc version, but allow building on other versions as well. Change: warnings --- .github/workflows/rust.yml | 1 + josh-filter/src/bin/josh-filter.rs | 1 - josh-proxy/src/bin/josh-proxy.rs | 1 - tester.sh | 1 + 4 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bc8dfa7e2..7cbd958ae 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + RUSTFLFAGS: "-D warnings" jobs: build: diff --git a/josh-filter/src/bin/josh-filter.rs b/josh-filter/src/bin/josh-filter.rs index 7dd81e57f..9f6622ef4 100644 --- a/josh-filter/src/bin/josh-filter.rs +++ b/josh-filter/src/bin/josh-filter.rs @@ -1,4 +1,3 @@ -#![deny(warnings)] #![warn(unused_extern_crates)] #[macro_use] diff --git a/josh-proxy/src/bin/josh-proxy.rs b/josh-proxy/src/bin/josh-proxy.rs index 839fb271a..ee772845a 100644 --- a/josh-proxy/src/bin/josh-proxy.rs +++ b/josh-proxy/src/bin/josh-proxy.rs @@ -1,4 +1,3 @@ -#![deny(warnings)] #[macro_use] extern crate lazy_static; diff --git a/tester.sh b/tester.sh index 895b6dad0..8788d74f6 100755 --- a/tester.sh +++ b/tester.sh @@ -48,6 +48,7 @@ if [[ ! -v CARGO_TARGET_DIR ]]; then exit 1 fi +export RUSTFLFAGS="-D warnings" cargo build --workspace --exclude josh-ui --features hyper_cgi/test-server ( cd josh-ssh-dev-server ; go build -o "\${CARGO_TARGET_DIR}/josh-ssh-dev-server" ) sh run-tests.sh ${TESTS}