Closed viperML closed 5 months ago
Yes, that’s a known issue, but we need to fix it. I often go far to long without noticing certain warnings.
I don't know what I'm doing, but I took a crack at this in 738f445082d6d5c8f96701ccd1fe1136a7a47715.
A simple example of the output:
:; nix -L --log-format internal-json eval --raw --expr 'builtins.trace "some trace message" ""' |& ./result/bin/nom --json
trace: some trace message
┏━ 1 Traces:
┃ trace: some trace message
┣━━━
┗━ ∑ ⚠ Exited with 1 traces reported by nix at 16:47:35 after 0s
For a more complicated example with NixOS module warnings (which is the main thing I was originally interested in fixing):
https://github.com/maralorn/nix-output-monitor/assets/54726391/67996707-50ab-4ad7-8ff3-81f33575f396
(built from this flake: https://github.com/daniel-sampliner/nix-output-monitor/blob/nixos-warning-example/flake.nix)
Github says that "video can't be plated because the file is corrupt"
Odd. I must have used funky ffmpeg seetings since that plays fine for me on my computer. Does this work:
I don't think static output does it full justice, but this is what the end results look like when building that flake:
┏━ 52 Traces:
⋮
┃ trace: warning: nixos module warning #34
┃ trace: warning: nixos module warning #35
┃ trace: warning: nixos module warning #36
┃ trace: warning: nixos module warning #37
┃ trace: warning: nixos module warning #38
┃ trace: warning: nixos module warning #39
┃ trace: warning: nixos module warning #40
┃ trace: warning: nixos module warning #41
┃ trace: warning: nixos module warning #42
┃ trace: warning: nixos module warning #43
┃ trace: warning: nixos module warning #44
┃ trace: warning: nixos module warning #45
┃ trace: warning: nixos module warning #46
┃ trace: warning: nixos module warning #47
┃ trace: warning: nixos module warning #48
┃ trace: warning: nixos module warning #49
┃ trace: warning: nixos module warning #50
┣━ Dependency Graph:
┃ ┌─ ✔ etc-bashrc
┃ │ ┌─ ✔ unit-dbus.service
┃ ├─ ✔ user-units
┃ │ ┌─ ✔ reload-container
┃ │ ┌─ ✔ unit-container-.service
┃ │ │ ┌─ ✔ perl-5.38.0-env ⏱ 2s
┃ │ │ ┌─ ✔ command-not-found
┃ │ │ ┌─ ✔ system-path ⏱ 1s
┃ │ │ ┌─ ✔ dbus-1
┃ │ │ ┌─ ✔ X-Restart-Triggers-dbus
┃ │ ├─ ✔ unit-dbus.service
┃ ├─ ✔ system-units
┃ ┌─ ✔ etc
┃ ✔ nixos-system-nixos-23.11.20231129.057f9ae
┗━ ∑ ⏵ 0 │ ✔ 228 │ ⏸ 0 │ ↓ 0 │ ↓ 371 │ ⏸ 0 │ ⚠ Exited with 52 traces reported b…
LGTM, very cool :+1:
When piping both stdout and stderr to nom, nom doesn't print back the trace messages:
Related: https://github.com/viperML/nh/issues/64