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

Make print-build-logs a setting #8323

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

edolstra
Copy link
Member

@edolstra edolstra commented May 12, 2023

Motivation

This allows you to put print-build-logs = true in nix.conf. It also implicitly adds --no-print-build-logs.

Context

Issue #5858.

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

This allows you to put `print-build-logs = true` in nix.conf.

Issue NixOS#5858.
@github-actions github-actions bot added new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority labels May 12, 2023
@edolstra
Copy link
Member Author

Adding a log-format setting is slightly trickier, since the old and new CLI have different defaults.

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

As someone who tried to get something very similar in before (but much more wide-reaching: #3961), I'd be very very happy to see this merged!

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

Adding a log-format setting is slightly trickier, since the old and new CLI have different defaults.
Can't we just agument a enum with an extra case "default", which keeps the current per-CLI defaults?

I would rather have that than the print-build-logs setting.

@Ericson2314
Copy link
Member

Yeah just make it std::optional<LogFormat>

@edolstra
Copy link
Member Author

Yeah just make it std::optional<LogFormat>

It's not that easy, because setting log-format in nix.conf would change the behaviour of both the old and new CLI, which is probably not what you want. E.g. setting log-format = bar-with-logs to enable log output would change the old CLI to use the progress bar.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-02-nix-team-meeting-minutes-59/28666/1

@Qyriad
Copy link
Member

Qyriad commented Feb 3, 2024

This PR needs a rebase, but is there anything else blocking it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants