Skip to content
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

nix/main: Set verboseBuild to args.printBuildLogs #3291

Closed
wants to merge 1 commit into from

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Dec 26, 2019

When running nix build -L, it's slightly confusing to get the last 10
loglines again after the log-output.

When running `nix build -L`, it's slightly confusing to get the last 10
loglines again after the log-output.
@Ma27 Ma27 requested a review from edolstra January 17, 2020 23:02
Copy link
Member Author

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has a pretty ugly side-effect, when using nix build -L every line will be printed twice. I'm currently looking into it, please do not merge this!

@edolstra
Copy link
Member

Repeating the last log lines of the failing build is not necessarily a bad thing, for example when you're using --keep-going (since then the original error may have scrolled past a long time ago).

@Ma27
Copy link
Member Author

Ma27 commented Feb 19, 2020

I'm afraid I have to disagree here: at least in my experience the majority of errors occurs before the last 10 log-lines, that's one of the reasons why I almost always use -L.

Would it be a compromise in your opinion to only enable such a behavior if --keep-going is not set?

@edolstra
Copy link
Member

That may be true but in that case we should just get rid of the printing of the last few lines entirely (and just say something like "derivation X failed; run nix log X to see the build log").

@Ma27
Copy link
Member Author

Ma27 commented Feb 19, 2020

So you'd be fine with removing the "last N log lines"-feature? (Please note that I only care about it, if -L is set as I get regularly confused with having several lines duplicated when having a failed build).

@edolstra
Copy link
Member

Yes, sounds good to me.

@Ma27
Copy link
Member Author

Ma27 commented Feb 19, 2020

Just discovered that this can be done by setting the log-lines option, so this can be closed IMHO.

@edolstra should we still remove the functionality (or set log-lines by default to 0)?

@Ma27 Ma27 closed this Feb 19, 2020
@Ma27 Ma27 deleted the optional-verbose-build branch February 19, 2020 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants