Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta Adatta ai principianti
#1,851 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
postgresql, rust

Direzione di ricerca

Inizia da crates/registry-breg/tests/postgres_startup.rs:858, crates/registry-breg/src/startup.rs:588 e crates/registry-breg/tests/package_change_plan.rs:46-47 per confrontare i relativi feature gate e utilizzi. Esegui cargo clippy -p registry-breg --features postgres-test --all-targets -- -D warnings, quindi verifica che anche la combinazione documentata postgres-test,tooling abbia esito positivo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
2
Fork
0
Merge medio
8h 50m
PR unite (30g)
258

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di registrystack/registry-stack

Tutte le issue di registrystack/registry-stack

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.