Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't cargo publish --workspace --dry-run if the versions already exist #14789

Open
epage opened this issue Nov 6, 2024 · 0 comments
Open

Can't cargo publish --workspace --dry-run if the versions already exist #14789

epage opened this issue Nov 6, 2024 · 0 comments
Labels
A-workspaces Area: workspaces C-bug Category: bug Command-publish S-needs-team-input Status: Needs input from team on whether/how to proceed. Z-package-workspace Nightly: package-workspace

Comments

@epage
Copy link
Contributor

epage commented Nov 6, 2024

Problem

In testing #1169 on cargo release now that #14721 is fixed, I came across another way you can't dry-run existing versions: the overlay registry blocks it

[2024-11-06T21:50:26Z TRACE cargo_release::ops::cmd] /home/epage/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/b
in/cargo publish --manifest-path /home/epage/src/personal/clap/clap_lex/Cargo.toml -Zpackage-workspace --package clap_
lex --package clap_builder --package clap_derive --package clap --package clap_complete --package clap_complete_fig --
package clap_complete_nushell --package clap_mangen --dry-run --allow-dirty
    Updating crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
warning: crate [email protected] already exists on crates.io index
   Packaging clap_lex v0.7.2 (/home/epage/src/personal/clap/clap_lex)
warning: ignoring test `testsuite` as `tests/testsuite/main.rs` is not included in the published package
    Packaged 8 files, 42.9KiB (12.5KiB compressed)
   Packaging clap_builder v4.5.20 (/home/epage/src/personal/clap/clap_builder)
    Packaged 62 files, 914.9KiB (160.0KiB compressed)
   Packaging clap_derive v4.5.18 (/home/epage/src/personal/clap/clap_derive)
    Packaged 22 files, 162.1KiB (29.4KiB compressed)
   Packaging clap v4.5.20 (/home/epage/src/personal/clap)
warning: ignoring test `builder` as `tests/builder/main.rs` is not included in the published package
warning: ignoring test `derive` as `tests/derive/main.rs` is not included in the published package
warning: ignoring test `derive_ui` as `tests/derive_ui.rs` is not included in the published package
warning: ignoring test `examples` as `tests/examples.rs` is not included in the published package
warning: ignoring test `macros` as `tests/macros.rs` is not included in the published package
warning: ignoring test `ui` as `tests/ui.rs` is not included in the published package
    Updating crates.io index
error: failed to prepare local package for uploading

Caused by:
  failed to get `clap_builder` as a dependency of package `clap v4.5.20 (/home/epage/src/personal/clap)`

Caused by:
  found a package in the remote registry and the local overlay: [email protected]

Steps

$ cargo install cargo-release
$ git clone [email protected]:clap-rs/clap.git
$ cd clap
$ cargo +nightly publish -Zpackage-workspace --package clap_
lex --package clap_builder --package clap_derive --package clap --package clap_complete --package clap_complete_fig --
package clap_complete_nushell --package clap_mangen --dry-run --allow-dirty

Possible Solution(s)

Remove the restriction on the overlay which comes at the risk of it being abused.

Notes

No response

Version

cargo 1.84.0-nightly (0310497 2024-11-01)

@epage epage added A-workspaces Area: workspaces C-bug Category: bug Command-publish S-needs-team-input Status: Needs input from team on whether/how to proceed. Z-package-workspace Nightly: package-workspace labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspaces Area: workspaces C-bug Category: bug Command-publish S-needs-team-input Status: Needs input from team on whether/how to proceed. Z-package-workspace Nightly: package-workspace
Projects
None yet
Development

No branches or pull requests

1 participant