MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

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

Open oscarfv opened this issue 2 years ago • 6 comments

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

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

oscarfv avatar Sep 05 '22 23:09 oscarfv

Ping.

oscarfv avatar Sep 13 '22 14:09 oscarfv

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

lazka avatar Sep 23 '22 14:09 lazka

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.

oscarfv avatar Sep 23 '22 15:09 oscarfv

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 -> https://github.com/msys2/MSYS2-packages/discussions/2832#discussioncomment-3718506

lazka avatar Sep 23 '22 15:09 lazka

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.

oscarfv avatar Sep 23 '22 16:09 oscarfv

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

lazka avatar Sep 23 '22 16:09 lazka

@oscarfv can you please rebase?

GitMensch avatar Nov 29 '22 08:11 GitMensch