-
Notifications
You must be signed in to change notification settings - Fork 13.9k
refactor: Move to anstream + anstyle for styling #147207
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
Conversation
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
21b6067
to
1f92a2f
Compare
This comment has been minimized.
This comment has been minimized.
I'm curious about the perf impact, let's see if there are any. @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
refactor: Move to anstream + anstyle for styling
r? compiler |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (57098c1): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.0%, secondary 1.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 471.179s -> 472.5s (0.28%) |
2f51fc9
to
1e5a5fd
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
30f1dc2
to
793558e
Compare
This comment has been minimized.
This comment has been minimized.
953fa48
to
b85603e
Compare
This comment has been minimized.
This comment has been minimized.
b85603e
to
5aedef1
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
@bors r+ |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 4d94478 (parent) -> dc1feab (this PR) Test differencesShow 10 test diffs10 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard dc1feabef242259d61bd930713de3250577c1c71 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (dc1feab): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 473.902s -> 472.366s (-0.32%) |
rustc
usestermcolor
for styling and writing, whileannotate-snippets
usesanstyle
for styling and currently writes directly to aString
. When rendering directly to a terminal, there isn't/shouldn't be any differences. Still, there are differences in the escape sequences, which leads to slightly different output in JSON and SVG tests. As part of my work to haverustc
useannotate-snippets
, and to reduce the test differences between the two, I switchedrustc
to useanstlye
andanstream
for styling and writing.The first commit migrates to
anstyle
andanstream
and notably does not change the output. This is because it includes extra formatting to ensure thatanstyle
+anstream
match the current output exactly. Most of this code is unnecessary, as it adds redundant resets or uses 256-color (8-bit) when it could be using 4-bit color. The subsequent commits remove this extra formatting while maintaining the correct output when rendered.Zulip discussion