Skip to content

What to do about duplicate targets in a workspace? #6293

@ehuss

Description

@ehuss

Currently a workspace can have multiple packages with the same target names. This causes a problem if you attempt to build both targets at the same time. One will overwrite the other when it is hardlinked in the target dir, and the result is somewhat random.

This affects binaries, examples, and libraries. Tests and benchmarks have unique hashes in their names.

I'm unsure of the best way to deal with this. One option is to issue a warning if this happens (at workspace validation phase), and turn that warning into a hard error after a sufficiently long time.

Another option is to detect if you attempt to build conflicting targets and return an error explaining you can only build one at a time (with some explanation about the naming conflict).

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