Skip to content

dist-workspace.toml silently ignores unrecognized keys #2317

@shaanmajid

Description

@shaanmajid

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

[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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions