diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-08-04 23:11:08 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2023-08-04 23:11:08 +0200 |
commit | 7c09104a943978a165885e10697b418f8bab2795 (patch) | |
tree | 7fbd31e1515a59a9a7cc9b5c204a862bf0104a7b /tests/dump-db.sh | |
parent | 635df5ee95b80bf3ddb856997e89d44ef0b7514b (diff) |
nix/why-depends: fix output of `--precise`
I haven't checked when this was exactly introduced, but on Nix 2.16 I
realized that the additional lines inserted when using `--precise` are
completely separated from the tree:
nix why-depends /nix/store/ccgr4faaxys39s091qridxg1947lggh4-evcxr-0.14.2 /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0 --precise --extra-experimental-features nix-command
/nix/store/ccgr4faaxys39s091qridxg1947lggh4-evcxr-0.14.2
→ /nix/store/lcf37pgp3rgww67v9x2990hbfwx96c1w-gcc-wrapper-12.2.0
→ /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0
└───bin/evcxr: …':'}.PATH=${PATH/':''/nix/store/lcf37pgp3rgww67v9x2990hbfwx96c1w-gcc-wrapper-12.2.0/bin'':'/':'}…
└───bin/cpp: …k disable=SC2193.[[ "/nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/bin/cpp" = *++ ]] &&…
This is apparently because `std::cout` is buffered and flushed in the
end whereas the rest of the output isn't. The fix is rather simple, just
use `logger->cout` as it's already the case for the rest of the code.
This way we also don't need to insert additional newlines in the `hits`
map since that's something the logger takes care of.
Also added a small test to make sure that the layout of this is somehow
tested to reduce the risk of further regressions here.
Diffstat (limited to 'tests/dump-db.sh')
0 files changed, 0 insertions, 0 deletions