-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow passing multiple crate names to cargo new #9867
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
Strangely enough, I had to modify the
to
Should this change be? |
Thanks for the PR! I'd be a bit worried about how this feature would interact with flags like |
On a similar note, I would be concerned about the interaction with future changes like rust-lang/rfcs#2922 (#3506), which could add some complexity (especially if it adds interactive prompts). |
Thanks for your reply. I understand your concern. In my intended design, this only adds the ability to create multiple crates at once, whether When reading the source code of the Cargo, I found that the This is also required in some scenarios, as suggested by @jyn514 .This does provide a solution. In addition, the creation command of a single crate and the interaction of flags such as As you said, if there are different requirements for the current crate, for example, different |
Thanks for the reply. As in the reply above, in my envisioned design, none of the previous commands were affected for the creation of a single crate. It doesn't seem to be very complicated when it comes to adding some complex features in the future. As you may be concerned, I do not recommend customizing each crate when creating multiple crates at the same time. This increases the operation difficulty and reduces the usability. |
I think it would be reasonable to forbid using --name with multiple crates. I don't think cargo needs to forbid creating multiple crates at all for the user experience to still be good. |
I'm so sorry, I missed one thing. Applying the
So I used the clap:::use_delimiter function instead. |
I don't understand - why do you think that behavior is wrong? I would rather be able to use spaces than have to use commas and get slightly better errors in rare circumstances; it seems correct that the command above generated a |
Thank you for your reply. |
Yes @qiangheisenberg I agree with your responses and about what this PR does. My point though is that it can be surprising that this PR behaves as it does. For example Overall I don't know if the use case of initializing multiple crates at once with the exact same configuration except for name is really all that common. Today you can invoke |
Thanks for the reply. I'm just a simple extension of the previous one, and I don't think it's too much trouble with the complexities that follow. I understand your concern. If the introduction of this feature causes a lot of problems or the cargo doesn't need it, you can always turn it off. |
I'd like to propose that we do not accept this feature and say that @rfcbot fcp close |
Team member @alexcrichton has proposed to close this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
Agreed. I think it's reasonable to ask people to use |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to close, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
Ok looks like nothing major came up in the meantime, so I'm going to close. |
Maybe this issue #9823 can be closed? |
Allow passing multiple crate names to cargo new.
close #9823