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

cargo new and cargo init should optionally populate package.description in Cargo.toml... #12736

Closed
busticated opened this issue Sep 25, 2023 · 5 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-init Command-new S-propose-close Status: A team member has nominated this for closing, pending further input from the team S-triage Status: This issue is waiting on initial triage.

Comments

@busticated
Copy link

Problem

hey there 👋

i noticed that crates.io requires a package have a description (docs) but the cargo new and cargo init commands currently do not let you set that field.

Proposed Solution

allow users to set a package's description field via option flag - something like:

cargo new path/to/my-crate --name my-crate --description 'a new crate, yay!'

Notes

No response

@busticated busticated added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Sep 25, 2023
@epage
Copy link
Contributor

epage commented Sep 25, 2023

There are a lot of fields of interest and a lot of ways to handle them (CLI vs prompts) and I feel this would be better left to be part of #5151.

@busticated
Copy link
Author

sure, but i suppose the blocker there is that there currently isn't an RFC?.. or did i miss it? from that thread, i'm not sure what the templates feature is, really. at the least it seems reasonable to expect that cargo new and cargo init would produce a valid manifest for crates.io even if those required fields cannot be set via flag / option.

@epage
Copy link
Contributor

epage commented Sep 28, 2023

I'm going to propose to the cargo team that we close this.

I feel like there isn't enough of a case to justify breaking ground on this independent of #5151 where we can take a more holistic view of the problem. If nothing else, the user can always workaround this by editing the file directly. For me, the better route would be to focus on warnings once we have #12235.

@epage epage added the S-propose-close Status: A team member has nominated this for closing, pending further input from the team label Sep 28, 2023
@weihanglo
Copy link
Member

at the least it seems reasonable to expect that cargo new and cargo init would produce a valid manifest for crates.io even if those required fields cannot be set via flag / option.

I've seen lots of cases that people are lazy and always submit default placeholders of different tools. From where I see it, producing an incomplete manifest is an intentional choice giving people think twice before uploading to crates.io.

@weihanglo
Copy link
Member

Going to close this. See #12736 (comment) for alternatives.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-init Command-new S-propose-close Status: A team member has nominated this for closing, pending further input from the team S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

3 participants