oxidecomputer / oxidecomputer/omicron
omicron builds fail when clippy is unhappy with code from dependencies
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
When trying to bump the dendrite version, omicron CI builds started failing because clippy was unhappy with some of the code imported from dpd-client:
2098 2024-01-23T21:44:13.181Z --> /work/oxidecomputer/omicron/target/debug/build/dpd-client e0a00b57212e7804/out/dpd-client.rs:3333:9
2099 2024-01-23T21:44:13.181Z |
2100 2024-01-23T21:44:13.181Z 3333 | / let mut query = Vec::with_capacity(1usize);
2101 2024-01-23T21:44:13.181Z 3334 | | query.push(("force_sync", force_sync.to_string()));
2102 2024-01-23T21:44:13.181Z | |___________________________________________________________^ help: consider using the `vec![]` macro: `let query = vec![..];`
2103 2024-01-23T21:44:13.181Z |
2104 2024-01-23T21:44:13.181Z = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push
2105 2024-01-23T21:44:13.182Z = note: `-D clippy::vec-init-then-push` implied by `-D warnings`
2106 2024-01-23T21:44:13.182Z = help: to override `-D warnings` add `#[allow(clippy::vec_init_then_push)]`
(from the build log at https://github.com/oxidecomputer/omicron/runs/20791167193)
Ideally progenitor would generate clippy-clean code (https://github.com/oxidecomputer/progenitor/issues/701) or include a directive to clippy to ignore it. Regardless, it seems odd that we would be running clippy on external crates as part of the omicron build process.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced Omicron CI build log and the generated target/debug/build/dpd-client/out/dpd-client.rs location to understand why dependency-generated code is checked by clippy. Review progenitor issue #701 for the proposed generator-side solution. Done means the Omicron build no longer fails on clippy warnings originating from external generated code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100