axodotdev / axodotdev/cargo-dist
dist-workspace.toml silently ignores unrecognized keys
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
cargo-dist does not warn or error on unrecognized keys in `dist-workspace.toml`. This caused a typo to silently disable a security feature for every release of a project.
### Example
```toml
[dist]
github-attestions = true # typo: should be "github-attestations"
```
`dist generate-ci`, `dist plan`, and `dist build` all succeed without any warning. The generated `release.yml` simply omits the attestation step and permissions, as if the key was never set. We shipped multiple releases before discovering the issue by manually diffing against another project's workflow.
### Expected behavior
cargo-dist should warn (or error) when it encounters an unrecognized key in `dist-workspace.toml`. Something like:
```
WARN unknown key `github-attestions` in [dist] — did you mean `github-attestations`?
```
### Context
- cargo-dist 0.30.3
- The typo went undetected across several releases because nothing in the pipeline flagged it
- The `dist plan` CI check (as used by some projects to validate their release config) also does not catch this
- Fixed via: https://github.com/spinel-coop/rv/pull/576
Contributor guide
Research direction
Start by tracing how dist-workspace.toml is parsed and how the dist generate-ci, dist plan, and dist build entry points handle unknown keys. Reproduce the github-attestions example, then verify that an unrecognized key produces a warning or error and that valid github-attestations behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- release
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100