Skip to content

refactor(shell): Write at once rather than in fragments#12880

Merged
bors merged 4 commits into
rust-lang:masterfrom
epage:shell-fmt
Oct 26, 2023
Merged

refactor(shell): Write at once rather than in fragments#12880
bors merged 4 commits into
rust-lang:masterfrom
epage:shell-fmt

Conversation

@epage

@epage epage commented Oct 25, 2023

Copy link
Copy Markdown
Contributor

What does this PR try to resolve?

For cargo add and cargo search, rather than expose termcolors API, we wrote a styled fragment at a time.

This is no longer needed as of #12751 because we switched from termcolor to anstream which decorates stdout and stderr with any of the logic we need to adapt to the configured terminal. .

How should we test and review this PR?

Ran the commands locally to verify styled output. Tests verify unstyled output.

Additional information

@rustbot

rustbot commented Oct 25, 2023

Copy link
Copy Markdown
Collaborator

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-console-output Area: Terminal output, colors, progress bar, etc. A-interacts-with-crates.io Area: interaction with registries Command-add Command-search S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 25, 2023
@epage

epage commented Oct 25, 2023

Copy link
Copy Markdown
Contributor Author

@hi-rustin this is an example of how to style without write_stderr / write_stdout

@weihanglo

Copy link
Copy Markdown
Member

Looks good. Thanks

@bors r+

@bors

bors commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

📌 Commit de691b9 has been approved by weihanglo

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 Oct 26, 2023
@bors

bors commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

⌛ Testing commit de691b9 with merge f327dbd...

@bors

bors commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing f327dbd to master...

@bors
bors merged commit f327dbd into rust-lang:master Oct 26, 2023
@0xPoe

0xPoe commented Oct 27, 2023

Copy link
Copy Markdown
Member

@hi-rustin this is an example of how to style without write_stderr / write_stdout

Thank you! Got it!

@epage
epage deleted the shell-fmt branch October 27, 2023 15:30
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 28, 2023
Update cargo

8 commits in df3509237935f9418351b77803df7bc05c009b3d..708383d620e183a9ece69b8fe930c411d83dee27
2023-10-24 23:09:01 +0000 to 2023-10-27 21:09:26 +0000
- feat(doc): Print the generated docs links (rust-lang/cargo#12859)
- feat(toml): Allow version-less manifests (rust-lang/cargo#12786)
- Remove outdated option to `-Zcheck-cfg` warnings (rust-lang/cargo#12884)
- Remove duplicate binaries during install (rust-lang/cargo#12868)
- refactor(shell): Write at once rather than in fragments (rust-lang/cargo#12880)
- docs(ref): Link to docs.rs metadata table (rust-lang/cargo#12879)
- docs(contrib): Describe how to add a new package (rust-lang/cargo#12878)
- move up looking at index summary enum (rust-lang/cargo#12749)

r? ghost
@ehuss ehuss added this to the 1.75.0 milestone Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-console-output Area: Terminal output, colors, progress bar, etc. A-interacts-with-crates.io Area: interaction with registries Command-add Command-search S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants