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

Change the package.publish default to false on an edition boundary #12690

Closed
epage opened this issue Sep 18, 2023 · 2 comments · Fixed by #12786
Closed

Change the package.publish default to false on an edition boundary #12690

epage opened this issue Sep 18, 2023 · 2 comments · Fixed by #12786
Labels
A-edition-next Area: may require a breaking change over an edition A-manifest Area: Cargo.toml issues C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-team-input Status: Needs input from team on whether/how to proceed.

Comments

@epage
Copy link
Contributor

epage commented Sep 18, 2023

Problem

For Cargo.toml, package.publish defaults to true.

For "cargo script", package.publish defaults to false.

I also feel like publishing should be more of an explicit choice. especially when working on a workspace where a cargo release (and eventually cargo publish in #1169) can release everything in the workspace.

Proposed Solution

By changing the default, we close the documentation gap between these features.

Notes

See also #6153

@epage epage added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` A-edition-next Area: may require a breaking change over an edition S-triage Status: This issue is waiting on initial triage. S-needs-team-input Status: Needs input from team on whether/how to proceed. A-manifest Area: Cargo.toml issues labels Sep 18, 2023
@ehuss ehuss removed the S-triage Status: This issue is waiting on initial triage. label Sep 25, 2023
@epage
Copy link
Contributor Author

epage commented Oct 9, 2023

Came up with a really great alternative to this in #12786: default package.publish based on whether version is set.

@Goffen
Copy link

Goffen commented Oct 12, 2023

I almost accidentally pushed my crate for my employer to crates.io because I've misunderstood something with the configuration of registry:s

First time publishing a crate should maybe prompt some extra security. Like "Are you sure these files ..... will be uploaded to crates.io/xx/yy" ?!

Thank god I've not configured an access token to crates.io

@bors bors closed this as completed in 307486e Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-next Area: may require a breaking change over an edition A-manifest Area: Cargo.toml issues C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-team-input Status: Needs input from team on whether/how to proceed.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants