-
Notifications
You must be signed in to change notification settings - Fork 13.3k
compiletest: Improve diagnostics for line annotation mismatches #140622
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
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
Nice! I'll play around with this |
☔ The latest upstream changes (presumably #140599) made this pull request unmergeable. Please resolve the merge conflicts. |
@jieyouxu I does two things
Also, this part is not always added, it's only added to primary diagnostics, but not to labels or suggestions, for example. I think maybe just drop it to reduce noise and duplication. |
Another possible improvement is to display relative paths to test files instead of absolute paths, also to avoid noise, duplication and rightward shift. The main requirement for the paths is to be "clickable", so you can quickly go from a Relative paths here would work for me (vscode + |
When some line annotations are missing or misplaced, compiletest reports an error, but the error is not very convenient.
This PR attempts to improve the user experience.
proc_res.status
andproc_res.cmdline
message is no longer put in the middle of other messages describing the annotation mismatches, it's now put into the end.I'll post screenshots in the thread below, but the behavior shown on the screenshots can be reproduced locally using the new test
tests/ui/compiletest-self-test/line-annotation-mismatches.rs
.r? @jieyouxu