Skip to content

warn on duplicate workspace.members #16924

@CosmicHorrorDev

Description

@CosmicHorrorDev

What it does

(unsure if this should be a lint, but it seemed the most fitting issue category)

it seems like cargo is totally chill with the same crate being listed in workspace.members multiple times. not a big deal, but i was expecting some kind of warning when i saw this in a project

Advantage

ensures that the members list is a better reflection of the workspace

Drawbacks

not that i can think of

Example

[workspace]
resolver = "3"
members = ["repro", "repro", "repro"]
$ cargo check
    Checking repro v0.1.0 (/tmp/workspace/repro)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
    # no warnings

where you would normally expect to see

[workspace]
resolver = "3"
members = ["repro"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-new-lintArea: new lintS-triageStatus: This issue is waiting on initial triage.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions