Skip to content

Add attribute support to extra::term - #7716

Merged
bors merged 4 commits into
rust-lang:masterfrom
lilyball:term-attr
Jul 15, 2013
Merged

Add attribute support to extra::term#7716
bors merged 4 commits into
rust-lang:masterfrom
lilyball:term-attr

Conversation

@lilyball

Copy link
Copy Markdown
Contributor

Teach extra::term to support more terminal attributes than just color.

Fix the compiler diagnostic messages to print in bold instead of bright white. This matches Clang's output.

Cache the term::Terminal instead of re-parsing for every diagnostic (fixes#6827).

@lilyball

Copy link
Copy Markdown
ContributorAuthor

r? @cmr

@kud1ing

Copy link
Copy Markdown

Thanks

@lilyball

Copy link
Copy Markdown
ContributorAuthor

Updated to the new local_data API that caused the previous breakage. r? @cmr

@lilyball

Copy link
Copy Markdown
ContributorAuthor

/bin/sh: line 1: 30686 Segmentation fault: 11 x86_64-apple-darwin/stage2/test/rustpkgtest-x86_64-apple-darwin --logfile tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-rustpkg.log
make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-rustpkg.ok] Error 139

If I run make check on the exact same source tree that bors used, it passes just fine.

Also add .supports_attr() to test for attribute support without writing
anything to output.
Update .reset() to use sgr0 instead of op.
Clang actually highlights using bold, not using bright white. Match
clang on this so our diagnostics are still readable on terminals with a
white background.
Stuff the term::Terminal into TLS to avoid re-parsing for every single
message we want to color.
Fixesrust-lang#6827.
@lilyball

Copy link
Copy Markdown
ContributorAuthor

r? @cmr

bors added a commit that referenced this pull request Jul 14, 2013
Teach `extra::term` to support more terminal attributes than just color.
Fix the compiler diagnostic messages to print in bold instead of bright white. This matches Clang's output.
Cache the term::Terminal instead of re-parsing for every diagnostic (fixes#6827).
@borsbors closed this Jul 15, 2013
@bors
bors merged commit 1d4c314 into rust-lang:masterJul 15, 2013
@lilyball
lilyball deleted the term-attr branch July 15, 2013 00:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache Terminal in libsyntax

4 participants

@lilyball@kud1ing@emberian@bors