Fix activation under Nix 2.3 and stop run function from discarding error messages#5067
Merged
rycee merged 2 commits intonix-community:masterfrom Mar 8, 2024
Merged
Conversation
In most cases where this function is used, suppressing only the standard output is more appropriate. Culling diagnostic output hides error messages and makes debugging more difficult and confusing. `$DRY_RUN_NULL`, which the `--silence` flag replaced, was used both for suppressing standard output on its own, and for doing so along with diagnostic output; however, when the `run` function was added this distinction was lost, and both outputs would be discarded. This reintroduces the needed functionality, and changes usages of `--silence` to `--quiet` where previously only standard output was suppressed, or where this should have probably been the case anyway. Change-Id: Ifb1b52a1d1eea0117261c782d686ad7c71b43162
In Nix 2.3, all GC roots must be stored under `/nix/var/nix/gcroots`, unless `--indirect` is specified. In Nix 2.4 and above, this flag is ignored, because all GC roots created by `--add-root` are indirect. Change-Id: I3eb3d7bc774af2ff336a2cdf312d30a99cdcb928
376865a to
1743197
Compare
Member
|
Thanks, that's great! Merged to master now 🙂 |
tvlbot
pushed a commit
to tvlfyi/tvix
that referenced
this pull request
Mar 11, 2025
* Bump Emacs 29 to 30 to address CVEs in prior versions: NixOS/nixpkgs#386174 * //3p/overlays/tvl: - Drop upstreamed fix for buildkite-agent - Drop tpm2-pkcs11 patch for an issue that has been addressed in 1.9.1. - Drop Nix 2.3 patch for home-manager. An alternative to it has been upstreamed in <nix-community/home-manager#5067>. * //users/flokli/presentations: disable derivations that have been failing since the latest chromium upgrade (presumably). reveal-md … --print fails to export a PDF. Enabling debug output reveals that a timeout in pupeteer is hit. Change-Id: Id83eb5e5fe2db77e648817c5c737b2f95b43deeb Reviewed-on: https://cl.tvl.fyi/c/depot/+/13217 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
tvlbot
pushed a commit
to tvlfyi/kit
that referenced
this pull request
Mar 11, 2025
* Bump Emacs 29 to 30 to address CVEs in prior versions: NixOS/nixpkgs#386174 * //3p/overlays/tvl: - Drop upstreamed fix for buildkite-agent - Drop tpm2-pkcs11 patch for an issue that has been addressed in 1.9.1. - Drop Nix 2.3 patch for home-manager. An alternative to it has been upstreamed in <nix-community/home-manager#5067>. * //users/flokli/presentations: disable derivations that have been failing since the latest chromium upgrade (presumably). reveal-md … --print fails to export a PDF. Enabling debug output reveals that a timeout in pupeteer is hit. Change-Id: Id83eb5e5fe2db77e648817c5c737b2f95b43deeb Reviewed-on: https://cl.tvl.fyi/c/depot/+/13217 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
flokli
pushed a commit
to flokli/slides
that referenced
this pull request
Mar 23, 2025
* Bump Emacs 29 to 30 to address CVEs in prior versions: NixOS/nixpkgs#386174 * //3p/overlays/tvl: - Drop upstreamed fix for buildkite-agent - Drop tpm2-pkcs11 patch for an issue that has been addressed in 1.9.1. - Drop Nix 2.3 patch for home-manager. An alternative to it has been upstreamed in <nix-community/home-manager#5067>. * //users/flokli/presentations: disable derivations that have been failing since the latest chromium upgrade (presumably). reveal-md … --print fails to export a PDF. Enabling debug output reveals that a timeout in pupeteer is hit. Change-Id: Id83eb5e5fe2db77e648817c5c737b2f95b43deeb Reviewed-on: https://cl.tvl.fyi/c/depot/+/13217 Autosubmit: sterni <sternenseemann@systemli.org> Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request contains two changes:
treewide: stop
runfrom discarding error messagesAdds a
--quietflag torun, which functions similarly to (but is mutually exclusive with) its existing--silenceflag. When applied, this redirects only standard output (unlike--silence, which also redirects standard error) to/dev/null, allowing errors and other diagnostics to be seen. This commit also replaces various usages of--silencewith--quietwhere the latter seems more appropriate.Before this change, gratuitous suppression of diagnostic output resulted in me running into the following (rather confusing) failure message:
With
--silencesubstituted for--quiet, the output instead looks like the following (with the cause of the failure being much more apparent):files: fix activation under Nix 2.3
Adds the
--indirectflag to a failingnix-store --add-rootinvocation in the activation script. This flag is required in Nix 2.3 if creating a garbage collector root outside of/nix/var/nix/gcroots. In subsequent versions of Nix, all garbage collector roots created by--add-rootare indirect, and the flag is a no-op.Checklist
Change is backwards compatible.
Code formatted with
./format.Code tested through
nix-shell --pure tests -A run.allornix develop --ignore-environment .#allusing Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.