-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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: disable line-clearing with TERM=dumb #179027
Conversation
if it works all the same then that's fine. should target staging though because it'll cause a mass rebuild. |
lets set for example, this ninja gives no output nixpkgs/pkgs/development/tools/build-managers/gn/generic.nix Lines 41 to 45 in f72be3a
or lets patch ninja to detect nix-build's "dumb" terminal |
nix-build largely passes TERM from the invoking shell to the builder, so patching ninja wouldn't help very much. setting TERM=dumb by default would also affect all other builds and all other commands. that might arguably be a good thing for reproducibility, but it'll mess with builders that can output pretty and useful logs right now :( |
ninja could do or similar
|
if we do patch ninja we should do it in a form that can be upstreamed, looking at nix-specific environment variables doesn't sound like that would fit the case. maybe it's as simple as emitting line clearing only when outputting to a tty (which the builders do not)? |
why?
says and same with feel free to post a better idea than |
because carrying nix-specific patches to a build system just to make output a little prettier has a pretty bad cost/benefit ratio. this looks benign, but as soon as someone depends ninja doing what it does we'd have to patch that as well. (unlikely, but possible!)
fd 0 is in any case though: patching ninja for slight cosmetic changes is not the solution. we'd be better off patching nix to occasionally flush a line to the log reader once a certain buffer size limit is exceeded. |
aah! patch sent, fingers crossed : ) |
also when building ninja
the 36 lines are line-cleared into one line |
upstream said no, so lets just stick with
yes. its not a bug, its a feature when people call ninja directly in buildPhase, they will have to use |
Description of changes
TERM=dumb ninja
is 1% prettier than the current solutionninja | cat
cat
shows up as a separate process in my process treeTERM=dumb
is less visiblebased on #149810 (comment)
ping @pennae
Background
https://github.com/ninja-build/ninja/blob/master/src/line_printer.cc
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes