Skip to content
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

ninja: use $TERM to decide when to use fancy output, take 2 #12975

Closed
wants to merge 1 commit into from

Conversation

oscarfv
Copy link
Contributor

@oscarfv oscarfv commented Sep 5, 2022

... for one-line progress messages on terminal emulators without using hacks such as winpty.

Do no activate color, because ANSI escape sequences breaks CMake.

... for one-line progress messages.

Do no activate color, because ANSI escape sequences breaks CMake.
@oscarfv
Copy link
Contributor Author

oscarfv commented Sep 13, 2022

Ping.

@lazka
Copy link
Member

lazka commented Sep 23, 2022

Sorry, for the delay. We have conpty now enabled by default. Is this still needed?

@oscarfv
Copy link
Contributor Author

oscarfv commented Sep 23, 2022

Just checked it, nice! That solves the problem for the MSYS2 console on modern enough Windows versions. If those conditions are not met, nothing changes, though.

I think the one-line progress meter is a significant usability feature, not just a cosmetic thingy. I've been using it on Emacs for the last months and it saves a lot of scrolling up/down for chasing the relevant compiler diagnostics (which are usually those that are first shown.)

OTOH I'm aware that you might have reservations about having this as a local patch. I'm not 100% happy about that situation either, but upstream did not cooperate with finding what would be an acceptable solution.

Anyways, after the conpty change I would like to rework the patch to give priority to the existence of a console over the $TERM environment variable, that would ensure that ninja works the same way as today under the MSYS2 console with conpty support.

@lazka
Copy link
Member

lazka commented Sep 23, 2022

Just checked it, nice! That solves the problem for the MSYS2 console on modern enough Windows versions. If those conditions are not met, nothing changes, though.

fyi, that's ~97% of our active user base -> msys2/MSYS2-packages#2832 (comment)

@oscarfv
Copy link
Contributor Author

oscarfv commented Sep 23, 2022

fyi, that's ~97% of our active user base -> msys2/MSYS2-packages#2832 (comment)

Yes, any problem related to out-of-date Windows will solve with time. However, that's just the part that relates to MSYS2 console. Running child processes such as Ninja from other host applications is also a reality, and ConPTY has limitations that makes supporting it on some of those host applications (such as Emacs) unrealistic.

@lazka
Copy link
Member

lazka commented Sep 23, 2022

Ah, ok, I didn't get the "inside emacs" part.

@GitMensch
Copy link
Contributor

@oscarfv can you please rebase?

@oscarfv oscarfv closed this Mar 21, 2023
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.

3 participants