Skip to content

Cannot dry-run cargo publish without bumping versions #14721

Closed
@epage

Description

@epage

Problem

When a tool like cargo release runs in a dry-run mode, it shouldn't be bumping version numbers. However, as of #14448, cargo publish --dry-run will fail unless the version numbers are bumped

Steps

$ git clone git@github.com:clap-rs/clap.git
$ cd clap
$ cargo +beta release major -vvv

Possible Solution(s)

Revert #14448 which makes us lose out on early error reporting. However, if we view publish as plumbing with tools like cargo release handling it, make its not too bad

Skip #14448's check in dry-run mode or downgrade it to a warning. Deviating behavior between dry-run or not can be confusing and break other workflows.

Tell people to use cargo package. There are slight behavior differences though.

Notes

cargo 1.83.0-beta.2 (15fbd2f 2024-10-08)

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-publishS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.regression-from-stable-to-betaRegression in beta that previously worked in stable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions