nix build: Print result paths to stdout with --no-link#2423
nix build: Print result paths to stdout with --no-link#2423ElvishJerricco wants to merge 3 commits intoNixOS:masterfrom
Conversation
|
I've been using this PR on my machine for a while now by applying the patch on the system's Nix package. It's been really useful so far, so I'd love to see this merged. But I've had one problem with it, at least with Nix 2.1.1. When Nix outputs Now, that's not on stdout, so it has no functional issue. But it is rather annoying. Anyone know what I should do about this? |
|
Alright, fixed it by clearing stderr first. |
|
This is unsafe, as it leaves a race condition of the build finishing, GC, and the path being used. |
|
I do think this race condition is manageable in most cases, as auto-GC is probably used only on a minority of deployments, but of course it would be even nicer to have some orthogonality, and maybe just the approach of always printing as in #2622 is the best. |
|
@grahamc I don't think that's solvable. Once our process exits, we have no way to guarantee to the user that the paths will remain in the store without a link. Personally I consider this an edge case. Since I find this feature to be mostly a convenience for when I'm messing around interactively, I'd much rather see that listed as a warning in the |
Using |
which will not work actually, now that I think of it.. the daemon needs to be able to see the |
Helps with #1930