Repository navigation
Commit 53d8da5
committed
fix(ci): deny warnings in 'features' step
fixes #4232.
in #4231, we found that we don't deny warnings when running cargo hack,
because of the predicate that conditionally gates a crate-level
`#![deny(warnings)]` attribute in `lib.rs`:
```rust
// src/lib.rs
#![cfg_attr(all(test, feature = "full"), deny(unreachable_pub))]
#![cfg_attr(all(test, feature = "full"), deny(warnings))]
#![cfg_attr(all(test, feature = "nightly"), feature(test))]
```
while this prevents warnings from existing when running `cargo test
--features full`, it does not affect other builds. so, this would not be
active in the commands run by the `features` step in CI, which runs the
following two `cargo-hack` commands:
```sh
RUSTFLAGS="-D dead_code -D unused_imports" \
cargo hack --no-dev-deps check \
--feature-powerset --depth 2 --skip ffi,tracing
RUSTFLAGS="--cfg hyper_unstable_tracing -D dead_code -D unused_imports" \
cargo hack --no-dev-deps check \
--feature-powerset --depth 2 --features tracing --skip ffi
```
this commit introduces a new feature, intended for internal use in CI,
called `__deny_warnings`. this provides another mechanism to deny
warnings when building hyper.
`cargo hack` invocations run in CI are updated to enable this flag.
because `-D dead_code -D unused_imports` are now redundant, the
`RUSTFLAGS` values passed to these steps are also accordingly
simplified.
Signed-off-by: katelyn martin <git@katelyn.world>1 parent 8abd0b4 commit 53d8da5
3 files changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 184 | + | |
187 | 185 | | |
188 | 186 | | |
189 | | - | |
| 187 | + | |
190 | 188 | | |
191 | | - | |
| 189 | + | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
0 commit comments