Skip to content

Add Config::run_subprocess_cmd #4202

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

Closed
wants to merge 1 commit into from

Conversation

smoelius
Copy link
Contributor

@smoelius smoelius commented Mar 1, 2025

The function Config::run_subprocess takes a program name and a list of arguments, constructs a command from them, and then runs the command.

The function this commit adds is similar, but it accepts an already constructed command.

Extracted from #4175

The function `Config::run_subprocess` takes a program name and a list
of arguments, constructs a command from them, and then runs the command.

The function this commit adds is similar, but it accepts an already
constructed command.

Extracted from rust-lang#4175
rami3l
rami3l previously approved these changes Mar 2, 2025
Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting all those PRs!

@rami3l rami3l dismissed their stale review March 2, 2025 02:56

After another look, I'm now slightly inclined to rejecting this for two reasons:

  1. Without the original patch, this extra public API serves no purpose. (PS: In previous reviews @djc seems to be strongly against dangling APIs, and, they should be inlined if they don't represent a recurring pattern.)
  2. If we were to merge this, I guess the #[track_caller] should be moved to .run_subprocess_cmd(), however this has added an extra layer of indirection everywhere. Of course, this point will remain debatable if it represents a real use case.
@rami3l rami3l requested a review from djc March 2, 2025 02:57
@smoelius
Copy link
Contributor Author

smoelius commented Mar 2, 2025

I won't be insulted if you reject this. Thank you for merging the other three. :)

@djc
Copy link
Contributor

djc commented Mar 2, 2025

Yeah, by itself this doesn't seem a clear improvement. Thanks for your contributions, though!

@djc djc closed this Mar 2, 2025
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.

3 participants