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 upHighlight code in `rustc --explain` (WIP) #39300
Conversation
estebank
added some commits
Jan 22, 2017
rust-highfive
assigned
pnkfelix
Jan 25, 2017
This comment has been minimized.
This comment has been minimized.
|
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
Not ready for merging yet: It doesn't check wether the output can actually support color codes. Piping to other tools will cause control characters to be displayed: $ rustc --explain E0038 > file.txt && more file.txt
(...)
```
ESC[33mtraitESC(BESC[m ESC(BESC[mFooESC(BESC[m ESC(BESC[mESC[33mwhereESC(BESC[m ESC(BESC[mESC[36mSelfESC(BESC[m:ESC(BESC[m ESC(BESC[mSizedESC(BESC[m ESC(BESC[m{ESC(BESC[m
ESC(BESC[m}ESC(BESC[m
ESC(BESC[m```
(...)
|
This comment has been minimized.
This comment has been minimized.
|
|
pnkfelix
changed the title
Highlight code in `rustc --explain`
Highlight code in `rustc --explain` (WIP)
Feb 20, 2017
This comment has been minimized.
This comment has been minimized.
|
@estebank any status update here? Should I close this PR? |
This comment has been minimized.
This comment has been minimized.
|
@pnkfelix I've been offline for two weeks and haven't had a chance to clean this up for submission (it's lacking detection of pipe vs stdout output). Regardless, could you advice on the changes that were made already, in order to know wether they're in the right track? |
This comment has been minimized.
This comment has been minimized.
|
@estebank I'm not clear on whether we can just add new dependencies to |
This comment has been minimized.
This comment has been minimized.
|
@pnkfelix this PR didn't introduce any external crates, it moved existing code into its own crate. I'll try to get back to this PR this Saturday to clean it up for merging. |
This comment has been minimized.
This comment has been minimized.
|
Closing due to inactivity, but feel free to resubmit with a rebase! (seems like a nifty addition!) |
estebank commentedJan 25, 2017
Internals thread.
New output: