Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

breg: two test targets fail to build with postgres-test but without tooling

Đang mở Phù hợp với người mới
#1,851 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

area:breg bug criticality:p3

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:858 calls PreparedServer::runtime_pool_for_test, which crates/registry-breg/src/startup.rs:588 defines only under #[cfg(all(feature = "postgres-test", feature = "tooling"))]. That target is gated only on postgres-test, so it fails with E0599 (a compile error, not only a lint).
  • crates/registry-breg/tests/package_change_plan.rs:46-47 declares INSTANCE and DATABASE unconditionally, but only tooling-gated code uses them, so -D warnings reports 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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của registrystack/registry-stack

Tất cả issue của registrystack/registry-stack

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.