Skip to content

More verbose Debug implementation of std::process:Command #97176

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

Merged
merged 1 commit into from
Dec 27, 2022

Conversation

kraktus
Copy link
Contributor

@kraktus kraktus commented May 19, 2022

Mainly based on commit: zackmdavis@ccc019a from https://github.com/zackmdavis

close #42200

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label May 19, 2022
@rust-highfive
Copy link
Contributor

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with r? rust-lang/libs-api @rustbot label +T-libs-api -T-libs to request review from a libs-api team reviewer. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@rust-highfive
Copy link
Contributor

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 19, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@kraktus
Copy link
Contributor Author

kraktus commented May 20, 2022

I don't fully understand the cause of the error above, but It seems those make tests relied on the debug output of std::process::Command.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@JohnCSimon
Copy link
Member

ping from triage:
@kraktus
Returning to you to address comments.

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 3, 2022
@JohnCSimon
Copy link
Member

@kraktus
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you do please open the PR BEFORE you push to it, else you won't be able to reopen - this is a quirk of github.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this Aug 13, 2022
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Aug 13, 2022
@kraktus
Copy link
Contributor Author

kraktus commented Sep 4, 2022

@rustbot ready (thought it would reopen the issue)

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 4, 2022
Copy link
Member

@the8472 the8472 left a comment

Choose a reason for hiding this comment

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

The public Debug::fmt could also use an update mentioning that the contents are platform-specific and that the alternate format is available on some platforms.

@kraktus
Copy link
Contributor Author

kraktus commented Dec 9, 2022

The public Debug::fmt could also use an update mentioning that the contents are platform-specific and that the alternate format is available on some platforms.

I've completed the public doc, the wording can probably improved.

I appreciate the fast review cycle, thanks again.

Copy link
Member

@the8472 the8472 left a comment

Choose a reason for hiding this comment

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

Can you also rewrite your branch history?

@kraktus kraktus force-pushed the cmd_debug branch 2 times, most recently from 6963193 to deb4f5d Compare December 18, 2022 16:37
@kraktus kraktus requested review from the8472 and m-ou-se and removed request for m-ou-se and the8472 December 18, 2022 16:39
based on commit: zackmdavis@ccc019a from https://github.com/zackmdavis

close rust-lang#42200

Add env variables and cwd to the shell-like debug output.

Also use the alternate syntax to display a more verbose display, while not showing internal fields and hiding fields when they have their default value.
@the8472
Copy link
Member

the8472 commented Dec 27, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 27, 2022

📌 Commit eb63dea has been approved by the8472

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2022
@bors
Copy link
Collaborator

bors commented Dec 27, 2022

⌛ Testing commit eb63dea with merge 92c1937...

@bors
Copy link
Collaborator

bors commented Dec 27, 2022

☀️ Test successful - checks-actions
Approved by: the8472
Pushing 92c1937 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 27, 2022
@bors bors merged commit 92c1937 into rust-lang:master Dec 27, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 27, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (92c1937): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.1% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [2.1%, 2.1%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [2.8%, 3.0%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Aaron1011 pushed a commit to Aaron1011/rust that referenced this pull request Jan 6, 2023
More verbose `Debug` implementation of `std::process:Command`

Mainly based on commit: zackmdavis@ccc019a from https://github.com/zackmdavis

close rust-lang#42200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More verbose impl fmt::Debug for process::Command