maralorn / nix-output-monitor

Pipe your nix-build output through the nix-output-monitor a.k.a nom to get additional information while building.
GNU Affero General Public License v3.0
841 stars 24 forks source link

Collect errors in summary #60

Closed maralorn closed 1 year ago

maralorn commented 1 year ago

Idea: have a sticky window above the build graph which collects encountered errors.

SuperSandro2000 commented 1 year ago

This could also remove the confusion that errors can happen and the build still succeeds if some cache had a hickup.

┗━ ∑︎ ⏵︎ 0 │ ✔︎ 83 │ ⏳︎ 0 │ ↓︎ 0 │ ↓︎ 234 │ ⏳︎ 2 │ ⚠︎ Exited with 2 errors reported by nix at 14:12:31 after 19m43s
maralorn commented 1 year ago

As a matter of fact, this feature should be present on current main, so maybe be on the lookout for that.

SuperSandro2000 commented 1 year ago

What a coincidence. I just updated earlier today and already saw it. So far it did a really good job of collecting errors and was surprisingly helpful. So far I only encountered one small problem which is, that nom is now more often than not 2/3rds of the screen and while updating the terminal flickers a lot. Especially when much is happening in the logs, I can barely read what is happening. I am not sure if wezterm is making it worse by updating as fast as possible or improves it. I don't have a good idea how to fix that other than turning nom in a full TUI application and rendering logs separate.

maralorn commented 1 year ago

Yeah, I noticed that problem, too. That’s why am I not sure how to progress here. One idea might be to filter out errors which are not so helpful (i.e. the "n dependcies failed") and to simply limit the number of lines of errors. Maybe we can even only show the first line of an error when the error display becomes too big …

maralorn commented 1 year ago

I still believe that it is a technically not solvable problem short of writing a custom terminal emulator to have a) nom using the whole screen as a TUI app and b) get correct logs in the scrollback buffer without flickering

SuperSandro2000 commented 1 year ago

Maybe add a mode which hides the logs to reduce flickering?

One idea might be to filter out errors which are not so helpful (i.e. the "n dependcies failed")

I saw a few others related to fetching substituts which also seem to stay forever.

Maybe we can even only show the first line of an error when the error display becomes too big …

At least for hash mismatch the 3 lines are very useful.

maralorn commented 1 year ago

Maybe add a mode which hides the logs to reduce flickering?

Ah, yeah, that is planned.

One idea might be to filter out errors which are not so helpful (i.e. the "n dependcies failed")

I saw a few others related to fetching substituts which also seem to stay forever.

Yeah, I haven’t defined a timeout for errors. I think this error collection is most useful with --keep-going in which case at least build failures simply shouldn‘t go away.

Maybe we can even only show the first line of an error when the error display becomes too big …

At least for hash mismatch the 3 lines are very useful.

Yeah, totally.

blaggacao commented 1 year ago

Done? :smile:

maralorn commented 1 year ago

Yeah, I think so.