bug(ci): some warnings are not enforced by `features` step
Maintainer thường phản hồi trong vòng 1 ngày
@cratelyn đang làm issue này rồi.
Từ ngày 13/10/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
in https://github.com/hyperium/hyper/pull/4231, we noticed that the features step in the CI pipeline did not properly catch some warnings when running cargo hack against various feature combinations.
i tracked that down to a root cause of discrepancy between what warnings we enforce when running cargo test --features full, here:
Also since they can just be dropped immediately without triggering a warning, do
{}_span!macros not have#[must_use]?i was really curious about this as well. i think i figured this out:
first, i confirmed that
Enteredis marked with this attribute: https://docs.rs/tracing/0.1.44/src/tracing/span.rs.html#387and i was also able to confirm that a warning appears when building the errant commit
b236593bwith a nightly toolchain, with the tracing feature active.moreover, i even found that these did generate warnings in CI, here: https://github.com/hyperium/hyper/actions/runs/38023510701/job/114129390066#step:7:217
however, note the specific warnings we deny when running
cargo hack, here:- name: check --feature-powerset with tracing feature run: cargo hack --no-dev-deps check --feature-powerset --depth 2 --features tracing --skip ffi env: RUSTFLAGS: "--cfg hyper_unstable_tracing -D dead_code -D unused_imports"...as compared to the compiler warning:
warning: unused `EnteredSpan` that must be used --> src/proto/h1/role.rs:86:5 | 86 | trace_span!("parse_headers"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: once a span has been entered, it should be exited = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default help: use `let _ = ...` to ignore the resulting value | 86 | let _ = trace_span!("parse_headers");; | +++++++ +we are only denying
dead\_codeandunused\_imports, and this is a separate linting rule.we don't enforce warnings as strictly when running
cargo hack, because we only deny warnings in tests here:// 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))]https://github.com/cratelyn/hyper/blob/b236593b60195dd25b53fefbb6b3f47b422b2db9/src/lib.rs#L4-L6
i think we can fix this easily, but i wanted to write this up here to (a) explain in-band why we didn't see a CI failure previously, and (b) act as a comment i can spin out into a separate issue.
thank you again for your thoughtful review, @/dswij, i appreciate it very much.
we should bring these into alignment. it can be somewhat abrasive to develop code in a feature that always enforces warnings however, so it would be nice to keep this blanket enforcement of all warnings cordoned off to specific builds in CI, as opposed promoting that to an unpredicated #![deny(warnings)].
- Ngôn ngữ chính
- Rust
- Star
- 16.4k
- Fork
- 1.8k
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của hyperium/hyper
-
Publicly reexport the http crateĐang mởC-feature
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
hyperium/hyper#2652 · 4 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Write a HIP for `Body::poll_progress()`Có thể đã có người làm @cratelyn đã nhận 8 ngày trước. Đang mởA-body B-rfc C-feature
hyperium/hyper#4228 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Upgraded HTTP/2 CONNECT streams cannot be reset, so a failed tunnel looks like a clean closeCó thể đã có người làm @jeremyjpj0916 đã nhận 18 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Allow connection pools to stop reusing an HTTP/2 connection before its keep-alive timeoutCó thể đã có người làm @jiahaoliang đã nhận 36 ngày trước. Đang mởC-feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
hyperium/hyper#4186 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
HTTP/1 client connection is never closed or pooled when a response completes while the request body is still unsent ((Reading::KeepAlive, Writing::Body) is a terminal state)Có thể làm lại được @BlackRabbitCoder đã nhận 31 ngày trước và không có pull request nào đang mở. Đang mởC-bug
hyperium/hyper#4176 · 6 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của hyperium/hyper
Issue tương tự
-
agent:triaged bug bughunt pm:pipenv priority:p1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SocketDev/socket-patch#1608 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
adorsys/status-list-server#698 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Expose the dot grid colourĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nannou-org/egui_graph#92 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
sujithputta02/Esapay#13 ·
-
Deduplicate normalized_f64_bits (hash_table.rs and bloom_filter.rs)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
tursodatabase/turso#10002 ·
Maintainer thường phản hồi trong vòng 1 ngày