breg: two test targets fail to build with postgres-test but without tooling
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- postgresql, rust
- 领域
- backend, build-system, testing
调研方向
从 crates/registry-breg/tests/postgres_startup.rs:858、crates/registry-breg/src/startup.rs:588 和 crates/registry-breg/tests/package_change_plan.rs:46-47 开始,比较它们的 feature gate 和用法。运行 cargo clippy -p registry-breg --features postgres-test --all-targets -- -D warnings,然后确认文档中记录的 postgres-test,tooling 组合也能通过。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 9 小时 5 分钟
- 30 天内合并 PR
- 248
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
registrystack/registry-stack 的其他 Issue
-
agent-ready area:breg bug criticality:p3 triage:needs-implementation
难度 2/5 1-3 小时 新手友好度 78/100
registrystack/registry-stack#1941 ·
维护者通常 1 天内回复
-
area:casework bug criticality:p2 rust
难度 2/5 1-3 小时 新手友好度 78/100
registrystack/registry-stack#1936 ·
维护者通常 1 天内回复
-
area:casework bug criticality:p3 rust
难度 2/5 1-3 小时 新手友好度 85/100
registrystack/registry-stack#1934 ·
维护者通常 1 天内回复
-
area:release area:scheduling bug criticality:p3 triage:needs-implementation
难度 2/5 1-3 小时 新手友好度 68/100
registrystack/registry-stack#1909 ·
维护者通常 1 天内回复
-
area:release bug
难度 2/5 1-3 小时 新手友好度 86/100
registrystack/registry-stack#1874 ·
维护者通常 1 天内回复
查看 registrystack/registry-stack 的全部 Issue
相似的 Issue
-
mxl-compile: пример заполнения ячеек отклоняется Unica可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 1/5 1-3 小时 新手友好度 91/100
IngvarConsulting/unica#1301 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 1/5 1 小时以内 新手友好度 75/100
ajeetraina/awesome-docker-sbx#220 ·
-
`helios / deploy`: switch zone wait in `deploy.sh` has almost no headroom over healthy startup times可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭Test Flake
难度 2/5 1-3 小时 新手友好度 74/100
oxidecomputer/omicron#11453 ·
维护者通常 1 天内回复