Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#1,851 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
postgresql, rust

Línea de trabajo

Comience con crates/registry-breg/tests/postgres_startup.rs:858, crates/registry-breg/src/startup.rs:588 y crates/registry-breg/tests/package_change_plan.rs:46-47 para comparar sus feature gates y usos. Ejecute cargo clippy -p registry-breg --features postgres-test --all-targets -- -D warnings y, a continuación, verifique que la combinación documentada postgres-test,tooling también pase.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
2
Forks
0
Merge medio
9 h 5 min
PR fusionados (30 d)
248

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de registrystack/registry-stack

Todos los issues de registrystack/registry-stack

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.