Skip to content

cargo publish omits metadata component in version during checking if package is already published #15031

Closed
@cpp11nullptr

Description

@cpp11nullptr

Problem

Starting from 1.83, cargo publish fails if a registry contains package with the same {MAJOR}.{MINOR}.{PATCH} but different "build metadata" (after a plus sign) component.

Steps

Repro steps:

  1. cargo publish for package with version 0.1.0.
  2. cargo publish for package with version 0.1.0+123.

Actual behavior: error: crate foobar@0.1.0+123 already exists.

Expected behavior: version 0.1.0+123 should be published.

Possible Solution(s)

As temporary workaround, downgrading to 1.82 can be used.

Notes

It may be the same root case as for #15028.

Version

cargo 1.83.0 (5ffbef321 2024-10-29)
release: 1.83.0
commit-hash: 5ffbef3211a8c378857905775a15c5b32a174d3b
commit-date: 2024-10-29
host: x86_64-pc-windows-msvc
libgit2: 1.8.1 (sys:0.19.0 vendored)
libcurl: 8.9.0-DEV (sys:0.4.74+curl-8.9.0 vendored ssl:Schannel)
os: Windows 10.0.26100 (Windows 11 Enterprise) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-publishS-triageStatus: This issue is waiting on initial triage.regression-from-stable-to-stableRegression in stable that worked in a previous stable release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions