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

Deny publishing packages with non-standard name formats (Fix #6043) #6186

Closed
wants to merge 2 commits into from
Closed

Conversation

brahmlower
Copy link

This PR resolves #6043.

The issue requesting this feature mentions adding a warning, but because packages can't be removed once published, it seemed to make more sense to outright deny the publishing attempt by default. Packages with non-snake-case names can still be published using the allow-non-snake-name option.

- Prints an error message indicating that publishing failed because the package name is not snake case (the standard naming convention). Prevents accidentially publishing a new package with an unintended name format.
- Adds an option to ignore the snake case standard (--allow-non-snake-name)
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matklad (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@brahmlower
Copy link
Author

I had a brief chance to look into the failing test case last night. The resolve::passes_validation test is failing because test packages are created with non-conformant names, which are now blocked by the changes in this PR. I haven't been able to reproduce the issue locally though. It looks like there's a CI environment variable that might be playing a factor here, but I'm not too sure...

@alexcrichton
Copy link
Member

Thanks for the PR! In light of https://internals.rust-lang.org/t/cargo-and-rustup-development/8615/1 I don't think we're willing to merge this at this time. This is a relatively large change to Cargo itself which I unfortunately think we don't have tie to prioritize and review until after the edition and planning.

@brahmlower
Copy link
Author

Gotcha- that definitely makes sense given that context. Thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publishing a crate is case-sensitive
4 participants