Skip to content
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

Tweak multispan rendering to reduce output length #134181

Merged
merged 4 commits into from
Dec 14, 2024

Conversation

estebank
Copy link
Contributor

Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in *.stderr tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.

@estebank estebank marked this pull request as ready for review December 11, 2024 21:50
@rustbot
Copy link
Collaborator

rustbot commented Dec 11, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot
Copy link
Collaborator

rustbot commented Dec 11, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 11, 2024
@rust-log-analyzer

This comment has been minimized.

Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments.
@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2024

The Miri subtree was changed

cc @rust-lang/miri

@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk assigned oli-obk and unassigned petrochenkov Dec 13, 2024
@oli-obk oli-obk added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 13, 2024
@rust-log-analyzer

This comment has been minimized.

@estebank
Copy link
Contributor Author

I don't have access to a windows machine to fix that miri test, and the log that's being printed by CI doesn't really make sense, so I'll have to try a few different things to see what stderr output it actually expects 🙄

@oli-obk
Copy link
Contributor

oli-obk commented Dec 13, 2024

Ah, you can usually just bless with --target, as miri emulates all targets from any host. Idk how to do that from within this repo, @rust-lang/miri have you cross-tested from the rustc repo before?

@estebank
Copy link
Contributor Author

Don't consider `///` and `//!` docstrings to be empty for the purposes of multiline span rendering.
@RalfJung
Copy link
Member

RalfJung commented Dec 13, 2024

Ah, you can usually just bless with --target, as miri emulates all targets from any host. Idk how to do that from within this repo, @rust-lang/miri have you cross-tested from the rustc repo before?

Yeah I do that all the time, it even runs on CI. ./x test miri --target <foo> --bless should just work.

which I think have the dependency on windows_sys, which I'm not sure the miri test suite will help with, right?

It will handle that automatically. You may notice that the test runner that reported the failure here is a Linux runner. :)

@estebank
Copy link
Contributor Author

Ended up getting it right by "blind editing" (by making an expression that kind of looked the same physically as far as spans go to see what the new rendering looked like and going off that).

@bors r=oli-obk

@bors
Copy link
Contributor

bors commented Dec 13, 2024

📌 Commit 9f1044e has been approved by oli-obk

It is now in the queue for this repository.

@bors bors removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 13, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Dec 13, 2024
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 14, 2024
Tweak multispan rendering to reduce output length

Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 14, 2024
Tweak multispan rendering to reduce output length

Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#134181 (Tweak multispan rendering to reduce output length)
 - rust-lang#134209 (validate `--skip` and `--exclude` paths)
 - rust-lang#134231 (rustdoc-search: fix mismatched path when parent re-exported twice)
 - rust-lang#134236 (crashes: more tests v2)
 - rust-lang#134240 (Only dist `llvm-objcopy` if llvm tools are enabled)
 - rust-lang#134244 (rustc_borrowck: Stop suggesting the invalid syntax `&mut raw const`)
 - rust-lang#134251 (A bunch of cleanups (part 2))
 - rust-lang#134256 (Use a more precise span in placeholder_type_error_diag)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2846699 into rust-lang:master Dec 14, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 14, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 14, 2024
Rollup merge of rust-lang#134181 - estebank:trim-render, r=oli-obk

Tweak multispan rendering to reduce output length

Consider comments and bare delimiters the same as an "empty line" for purposes of hiding rendered code output of long multispans. This results in more aggressive shortening of rendered output without losing too much context, specially in `*.stderr` tests that have "hidden" comments. We do that check not only on the first 4 lines of the multispan, but now also on the previous to last line as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants