breg: two test targets fail to build with postgres-test but without tooling
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, rust
- Lĩnh vực
- backend, build-system, testing
Hướng nghiên cứu
Bắt đầu với crates/registry-breg/tests/postgres_startup.rs:858, crates/registry-breg/src/startup.rs:588 và crates/registry-breg/tests/package_change_plan.rs:46-47 để so sánh các feature gate và cách sử dụng của chúng. Chạy cargo clippy -p registry-breg --features postgres-test --all-targets -- -D warnings, sau đó xác minh rằng tổ hợp postgres-test,tooling được ghi trong tài liệu cũng vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
cargo clippy --locked --keep-going -p registry-breg --features postgres-test --all-targets -- -D warnings fails on current main. Two test targets assume the tooling feature without gating on it:
crates/registry-breg/tests/postgres_startup.rs:858callsPreparedServer::runtime_pool_for_test, whichcrates/registry-breg/src/startup.rs:588defines only under#[cfg(all(feature = "postgres-test", feature = "tooling"))]. That target is gated only onpostgres-test, so it fails withE0599(a compile error, not only a lint).crates/registry-breg/tests/package_change_plan.rs:46-47declaresINSTANCEandDATABASEunconditionally, but onlytooling-gated code uses them, so-D warningsreports them as dead code.
Impact
Low. The documented and CI commands always add tooling (products/breg/scripts/validate_product.py, products/breg/scripts/test-postgres.sh), so CI is green. A contributor who runs the PostgreSQL suite or clippy with --features postgres-test alone gets a build failure in files they did not touch.
Suggested fix
Gate the runtime_pool_for_test call (or the test that uses it) on feature = "tooling", and gate the two constants the same way as their users. Then check that cargo clippy -p registry-breg --features postgres-test --all-targets -- -D warnings and the documented postgres-test,tooling combination both pass.
- Ngôn ngữ chính
- Rust
- Star
- 2
- Fork
- 0
- Merge trung bình
- 8 giờ 50 phút
- Pull request đã merge (30 ngày)
- 258
Chuẩn bị môi trường
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 registrystack/registry-stack
-
agent-ready area:breg bug criticality:p3 triage:needs-implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
registrystack/registry-stack#1941 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:casework bug criticality:p2 rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
registrystack/registry-stack#1936 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:casework bug criticality:p3 rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
registrystack/registry-stack#1934 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:release area:scheduling bug criticality:p3 triage:needs-implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
registrystack/registry-stack#1909 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:release bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
registrystack/registry-stack#1874 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của registrystack/registry-stack
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Markdown Preview Fonts Don't Show Selected OptionCó thể đã có người làm @RadhiRasho đã nhận hôm nay. Đang mởstate:needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
zed-industries/zed#65300 · 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 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add collect method to DataFrameĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
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 82/100
Maintainer thường phản hồi trong vòng 1 ngày