-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add short flag for workspace #11549
Add short flag for workspace #11549
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) soon. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about my own stance on this. It seems not harmful, but people may find it a bikeshedding problem. Could you provide more sources to support this change? Such as
- How
-w
is used for in other command line tools. This is to avoid future conflicts for a well-recognized meaning over-w
. - What the most common shorthand flag is for workspace-like operation from other package manager.
- How frequent this flag is used and people are tired of typing it out.
Thank you anyway for posting this.
In my workspaces, basically always since I'm running
I don't think pip or bundler have workspaces, but npm does and uses the
Honestly I don't think random tool X's flag naming is relevant as they're different domains. |
First off, this is a lot of requirements / design discussion in a PR when typically we ask for this to happen in an Issue before a PR is ever created, see
For an example list of other tools we sometimes consider for prior art, see cargo-add's PR
Its very relevant on two fronts
One resource I commonly look to is https://www.gnu.org/prep/standards/html_node/Option-Table.html#Option-Table Some other questions
|
Regarding the implementation of this, it'd be worth checking the PR of the last major short flag we added (sadly, most of the research for what we considered when adding it was not captured in that PR or the one it references). |
I don't recall using a
Is there a command reference somewhere? Otherwise I can grep help pages.
More useful than |
https://doc.rust-lang.org/cargo/commands/index.html
I did not say "more useful" but "useful". Like I said, if |
Not exactly. Just try providing some data points. Some of them are relevant tools I feel like, though that doesn't imply Cargo is going to use |
Boom: https://doc.rust-lang.org/cargo/commands/cargo-update.html. We're already using
Sure, but I can't predict the future and don't know the roadmap. That's on you guys.
Great point, that's a good possible future direction. So then it's up to you guys: do you think cargo will ever have a watch feature? I personally don't see much value for Rust and we already have https://crates.io/crates/cargo-watch. |
Huh, never noticed that had a However, I will not that text communication can be hard and starting with "boom" like this can come across as trying to "win an argument" when there is no argument here but trying to gather the relevant information for making the best decision for cargo (as we can't change this due to compatibility).
Watch support is being discussed at #9339 Again, to be clear, this doesn't mean that this will necessarily be rejected or that it is that one is more important than the other but that we need to weigh in potential ambiguity. |
Right, and the fact that a
I think this is the key question then: if |
Actually, thinking about this a bit more, it's not unreasonable to think someone would want to run |
imo I would see watch support being a flag on select commands, like
Generally, watch mode is used during long-running tasks, like as part of an edit-build-test cycle. I can't quite picture a long running |
For anyone curious EDIT: Looked it up, hoping there was a note on why it wasn't applied to other commands but there isn't. |
Fair enough, so I think this is blocked on #9339. |
Filed #11554 |
I have no idea what the feature roadmap is, so adding a short flag might conflict with future plans. If it doesn't though, it'd be nice to have.