Uh oh!
There was an error while loading. Please reload this page.
Highlight code on diagnostics when underlined - #45752
Conversation
rust-highfive
commented
Nov 4, 2017
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
estebank
commented
Nov 4, 2017
Don't merge yet, needs a quick code change yet. |
@estebank I'm trying to remember why we stopped highlighting the code examples with color, but I cannot. In any case, the examples where there are overlapping spans look...odd to my eye. I wish we had a more elegant way of handling that. I feel like I would prefer if the underlines were drawn on different lines. This is to some extent a distinct issue, but the color makes it more noticeable to me. =) |
durka
commented
Nov 4, 2017
What's with the random blue highlighting in some examples? In the first one, |
estebank
commented
Nov 4, 2017
@durka because of a mistake I made, it's inserting style at position instead of actually replacing, making the output of overlapping spans incorrect, as you see in that screenshot. I didn't notice it until I published the PR :)
Neither can I :-/
As for the weirdness around overlapping spans, I feel that 1) it'd get sidestepped by highlighting with bold only (it'd just point towards region without carrying any info about the span type, that'd be only in the underline, so we end up in the same place as today), and 2) even beyond the weirdness of having differently colored code and underline is that it is one way of actually carrying information on where at least one of the spans actually starts without having multiple lines dedicated to the overlapping underlines, but it does look slightly weird. Even if we make the overlapping underlines appear in different lines we're back to really ugly output for thin terminals seen in #42112. |
02df37f to
fb8345bCompareestebank
commented
Nov 5, 2017
Alternative PR #45776 that doesn't use color, only highlights both primary and secondary spans. |
estebank
commented
Nov 8, 2017
Moving this to r? @nikomatsakis so that he's the reviewer for both alternative PRs. |
nikomatsakis
commented
Nov 9, 2017
I think there is general consensus that if we were to do anything, it would be #45776, right? Maybe we can close this one? |
estebank
commented
Nov 9, 2017
Closing. |
nikomatsakis
commented
Nov 14, 2017
Based on our recent conversation, maybe this is still on the table? |
estebank
commented
Nov 14, 2017
@nikomatsakis yes, let's keep it around. |
carols10cents
commented
Nov 27, 2017
estebank
commented
Nov 27, 2017
@carols10cents, I think @nikomatsakis and I lean towards merging this one, but I'd like to get some support to disable it in some way before doing so. |
shepmaster
commented
Dec 1, 2017
Sounds like @estebank has some more work to do before we'd be happy merging, yeah? |
nikomatsakis
commented
Dec 5, 2017
@estebank I say let's do it. We can always back off. |
nikomatsakis
commented
Dec 5, 2017
Well, I guess I agree with the idea that we should make it configurable. The time has come, I guess. |
shepmaster
commented
Dec 9, 2017
@estebank ping from triage — will you have some time to make this configurable? |
estebank
commented
Dec 11, 2017
@shepmaster I will try to have something before the end of the year. |
@nikomatsakis I started playing with using You can take a look at the code (broken at the moment) if you want to see the general approach I took. |
nikomatsakis
commented
Dec 20, 2017
cc @alexcrichton@eddyb @rust-lang/compiler -- seems ok to me in principle. I'm not sure if there are technical complications. |
fb8345b to
4f1148fCompareestebank
commented
Jan 29, 2018
@nikomatsakis, rebased and gated it on |
4f1148f to
cd01246Comparecd01246 to
08287c1Comparenikomatsakis
commented
Jan 29, 2018
good enough for now! @bors r+ |
bors
commented
Jan 29, 2018
📌 Commit 08287c1 has been approved by |
bors
commented
Jan 30, 2018
⌛ Testing commit 08287c1 with merge 9712a3319ba284f218145d17a162b150d896623d... |
bors
commented
Jan 30, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 30, 2018
@bors retry 3 hour timeout on |
bors
commented
Jan 30, 2018
⌛ Testing commit 08287c1 with merge 8ffa119abdc6290be864cad373cd4f7c1a16f76e... |
bors
commented
Jan 30, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 30, 2018
bors
commented
Jan 30, 2018
⌛ Testing commit 08287c1 with merge ee8dbd216863f3715fbf98ccaf089afa713ae737... |
bors
commented
Jan 31, 2018
💔 Test failed - status-appveyor |
estebank
commented
Jan 31, 2018
I'll try one more time @bors retry |
bors
commented
Jan 31, 2018
Highlight code on diagnostics when underlined Highlight the label's span with the respective color: <img width="692" alt="" src="https://user-images.githubusercontent.com/1606434/32411026-a1842482-c18d-11e7-9933-6510eefbad19.png"> Fix#42112.
bors
commented
Jan 31, 2018
☀️ Test successful - status-appveyor, status-travis |
Highlight the label's span with the respective color:
Fix#42112.