-
-
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: pipe ninja output through cat in hooks #149810
Conversation
ninja build progress output is not line-base, it overwrites the same line over and over again with its progress reporting. nix is line-based though, so ninja-based builds have their progress hidden. pipe ninja output through cat to avoid this.
Would using |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, I didn't test this but I don't think this should be able to break anything ;)
systemd and glib built fine with it, after those we stopped checking which derivations in the test build used ninja :D |
alternative solution: export TERM=dumb
ninja |
I think I have found a problem with this. The piping into cat ignores the exitcode of ninja. So I built this: nagy@ff0db14 The PoC is in the commit message. I have not found a package where this is a problem, but if we ever rely on the Does this need a pull request? |
edit: after experimenting locally, probably not. stdenv does set |
That would explain why I did not see this failing in normal package builds, thanks.
It is a bit unfortunate, but understandable that But ok, then this does not effect this code after all. Thank you for the investigation. |
Motivation for this change
it would be nice to have progress output from builds using ninja. (ninja progress reports are hidden because ninja never really writes out full lines, it keeps overwriting the same line)
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