Skip to content

Conversation

epage
Copy link
Contributor

@epage epage commented Oct 25, 2023

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
Copy link
Collaborator

rustbot commented Oct 25, 2023

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
Copy link
Contributor Author

epage commented Oct 25, 2023

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

@weihanglo
Copy link
Member

Looks good. Thanks

@bors r+

@bors
Copy link
Contributor

bors commented Oct 26, 2023

📌 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
Copy link
Contributor

bors commented Oct 26, 2023

⌛ Testing commit de691b9 with merge f327dbd...

@bors
Copy link
Contributor

bors commented Oct 26, 2023

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

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

0xPoe commented Oct 27, 2023

@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