Skip to content

Add docs to a bunch of stuff #13401

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

Merged
merged 15 commits into from
May 16, 2014
Merged

Add docs to a bunch of stuff #13401

merged 15 commits into from
May 16, 2014

Conversation

emberian
Copy link
Member

@emberian emberian commented Apr 8, 2014

Adds docs where previously there were no docs. Also adds windows support to libterm.

@emberian emberian changed the title Stuff Add docs to a bunch of stuff Apr 8, 2014
@emberian
Copy link
Member Author

emberian commented Apr 8, 2014

cc @vadimcn / @klutzy for the windows stuff


let entry = open(term);
if entry.is_err() {
if "cygwin" == term { // msys terminal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change the line to if "cygwin" == term && os::getenv("MSYSCON") == Some(~"mintty.exe")? I should've fixed it but forgot until now.

Explanation:
TERM=cygwin doesn't really mean it's ok to use TerminfoTerminal (escape sequences).
There are two ways to use escape seq: 1) use mintty (bundled in msys2), or 2) use libgreen (libuv internally parses escape sequence and calls windows console api).
It means currently rustc.exe output looks illegible if you use msys but don't use mintty.
To fix it, we have to create TerminfoTerminal only if it's on mintty. msys sets MSYSCON env to console application name, so we may use it.

Indeed it is mintty-specific bad hack. Other possible way is to not try to create TerminfoTerminal in term::stdout()/term::stderr(), but it would make rustc colorless on mintty.

@klutzy
Copy link
Contributor

klutzy commented Apr 9, 2014

I touched libterm a bit (as commented) and created small exe using libterm. It works very well on various settings: {libnative, libgreen} * {cmd, msys1, msys2, msys2+mintty}
Thanks for great work!

@flaper87
Copy link
Contributor

flaper87 commented May 3, 2014

@cmr ping, this needs rebase. ❤️ docs!

@emberian
Copy link
Member Author

emberian commented May 7, 2014

Rebased.

@steveklabnik
Copy link
Member

😍

// redirected to a different console. This is good enough for
// rustc though. See #13400.
let out = GetStdHandle(-11);
SetConsoleTextAttribute(out, accum);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for late comment, but this just occurred to me: don't you need buf.flush() before applying new attributes? Otherwise if you have a buffering writer, you'll apply new attributes to text that's already been output.

bors added a commit that referenced this pull request May 16, 2014
Adds docs where previously there were no docs. Also adds windows support to libterm.
@bors bors merged commit 3da99c5 into rust-lang:master May 16, 2014
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 18, 2022
Run `analysis-stats` on CI, with `opt-level = 1`

We might want to run `analysis-stats` on PRs, and this makes it less unbearable.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2024
Lint comparison to empty slice using `PartialEq` methods

changelog: [`comparison_to_empty`]: Also  detect comparaisons using `PartialEq` methods

Fix rust-lang#13401
Sign up for free to 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.

7 participants