Skip to content

Allow multiple pre-release versions of a dependency to co-exist #6016

Open

Description

As noted in the semver spec, pre-release versions do not have the same stability requirements as proper releases. Due to this, I believe that cargo should allow selecting multiple pre-release versions of a dependency without causing an error.

Not allowing this causes real problems, as can be seen with the "mime_guess" crate, which accidentally released a 1.0 version before its public dependency (mime) reached 1.0.

The only way for "mime_guess" to follow semver going forward would be to either release a new major version on every patch release of "mime", or (the solution chosen) to switch to only publishing pre-release versions (2.0-alpha1, 2.0-alpha2, etc.) with the hope that "mime" will soon have a 1.0 release and then mime_guess 2.0 proper can be published.

However, this causes headaches for the average user who depends on common crates like "hyper" and "reqwest", because these must now have dependencies on pre-release versions of "mime_guess", which universally conflict with each other.

I think this will be a problem going forward too, as crate versions are forever, so as soon as you publish a 1.0 of a crate, there's no return to allowing multiple versions to be linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-dependency-resolutionArea: dependency resolution and the resolverArea: dependency resolution and the resolverA-semverArea: semver specifications, version matching, etc.Area: semver specifications, version matching, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions