rust-lang / rust-lang/cargo

Want cargo publish --idempotent

Open
#13,397 34 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request Command-publish S-needs-info
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

View all comments

Problem

Sometimes a cargo publish run of multiple packages will fail. It is then necessary to restart it.

It would be nice if we could run the whole publication from the top, and simply skip crates that were already published. There are probably other uses.

Proposed Solution

cargo publish --idempotent

If the current version of the crate has already been published, skips the crate and exits with a success status.

(Ideally it would download the crate and check it's identical to what is proposed to publish now, but I think that crates.io does unpredictable-to-cargo mangling of the uploaded data which makes such a check infeasible.)

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests; begin at the cargo publish command entry point and trace multi-package publication and handling of an already-published version. Done means a new --idempotent option skips already-published current versions and returns success when rerunning a partial publication, with CLI coverage for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.