Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upBeginning of more beautiful rustc --explain #25033
Conversation
rust-highfive
assigned
nikomatsakis
May 1, 2015
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
GuillaumeGomez
changed the title
Beginning of beautifuler rustc --explain
Beginning of more beautiful rustc --explain
May 1, 2015
GuillaumeGomez
force-pushed the
GuillaumeGomez:explain
branch
from
6804393
to
390241e
May 1, 2015
GuillaumeGomez
added some commits
May 1, 2015
This comment has been minimized.
This comment has been minimized.
|
This sounds quite cool. Can you maybe add a screenshot? I guess by only using blue and red for highlights, you don't need to concern yourself with detecting the terminals background color (since red and blue both work on dark and light backgrounds). Do you have any plans for a more complex color scheme? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Errors and warnings are already colored. Rustc uses som kind of term library for this. You should look into it. |
This comment has been minimized.
This comment has been minimized.
|
@GuillaumeGomez, @bluss is right, there is a |
This comment has been minimized.
This comment has been minimized.
|
Oh nice ! I'll take a look then ! |
This comment has been minimized.
This comment has been minimized.
|
It would be good to have this code not directly inside |
This comment has been minimized.
This comment has been minimized.
|
@huonw: Don't worry, it was just a start to have an idea of what it'll look like after. For now, the code is just ugly. |
GuillaumeGomez
force-pushed the
GuillaumeGomez:explain
branch
from
ac17c61
to
02d875d
May 2, 2015
This comment has been minimized.
This comment has been minimized.
|
I created an |
This comment has been minimized.
This comment has been minimized.
ghost
commented
May 2, 2015
|
I'm concerned about the maintainability of this code. Could we use something like https://github.com/rkitover/vimpager or http://www.gnu.org/software/src-highlite/ for this purpose, instead? We have the vim definitions already so this would be a matter of shelling out, of course conditional on vim being present. The build changes may be non-trivial but would be more future-proof, I think. Thoughts? |
This comment has been minimized.
This comment has been minimized.
|
I'm a fan of emacs actually. :-p Once again, this code is just a preview, I don't intend to continue this one. I'd prefer use something from inside the compiler (I'm thinking about the |
This comment has been minimized.
This comment has been minimized.
|
One way I thought of doing this would be to write a custom renderer for Hoedown (the markdown parser used by |
This comment has been minimized.
This comment has been minimized.
|
@michaelsproul: hum... Why not. Originally, I was going to use the |
This comment has been minimized.
This comment has been minimized.
|
@GuillaumeGomez: It's a whole lot of FFI and stuff, but if you're up for it... |
This comment has been minimized.
This comment has been minimized.
|
I am. I'll start to see how |
michaelsproul
referenced this pull request
May 11, 2015
Merged
Markdown formatting for error explanations. #25302
This comment has been minimized.
This comment has been minimized.
|
@GuillaumeGomez So I am confused as to what should happen with this current PR -- should we close it, as you are now trying an alternative approach? |
This comment has been minimized.
This comment has been minimized.
|
I'm still working on rustdoc. I don't have much time recently (and I'm sorry about that). So can you keep it open while I start the other one please ? |
This comment has been minimized.
This comment has been minimized.
|
Closing due to inactivity, but I'm looking forward to see where this goes! |

GuillaumeGomez commentedMay 1, 2015
As mentionned in #24523, here is the beginning of the more beautiful printing. Only tested under linux. It doesn't -yet- manage terminals which doesn't handle color printing. Any opinion is welcome.