-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Bootstrap command refactoring: port more Command
usages to BootstrapCmd
(step 2)
#126822
Merged
+262
−173
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
903d6a9
Remove `run_cmd`
Kobzol cf5bbb3
Remove `run` and rename `run_tracked` to `run`
Kobzol 31911e5
Improve documentation of `BootstrapCommand`
Kobzol 3722fb5
Store `Command` directly inside `BootstrapCommand`
Kobzol 2a9d5ab
Make it easier to migrate `Command` to `BootstrapCmd`
Kobzol 86b2191
Migrate some usage of `Command` to `BootstrapCmd`
Kobzol f7d9543
Migrate `cargo_clippy_cmd` and `cargo_miri_cmd` to `BootstrapCommand`
Kobzol 8a890cb
Migrate a few command usages to `BootstrapCommand`
Kobzol 83d33c2
Migrate a few command usages to `BootstrapCommand`
Kobzol bed2cbd
Get rid of `Deref/DerefMut` impl for `BootstrapCmd`
Kobzol 2ebfcce
Migrate more `Command` usages to `BootstrapCmd`
Kobzol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It seems like this usage makes it like building commands from std
Command
, so it will not be possible to profile/debug/log (pretty much any reason that this implementation was based on) the execution. The inner command should never be exposed to avoid this problem.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.
Indeed, I plan to address this later. I'm doing the refactoring step by step, by introducing compatibility layers in the meantime, otherwise, I'd have to change all usages at once and that would be very hard to review and implement for me. One of those compatibility layers is making the Command
pub
, so that I can access it when needed.As one of the next N steps, I will make the command private, which will force me to deal with the more complex cases, like output streaming. But I don't want to do that yet, first I want to port all/most of the simple use-cases and iterate on the API.