Skip to content

[WIP] add --root-realisations to nix-instantiate#3086

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

[WIP] add --root-realisations to nix-instantiate#3086
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Sep 5, 2019

Currently using IFD (or similar mechanisms such as readFile from a derivation) together with garbage collection is a bad experience, since all derivations required for evaluation will have to be completely rebuilt after each run.

This PR adds an option --root-realisations to nix-instantiate which mirrors --add-root but creates a GC root for derivations used for evaluation instead of those that are the result of the evaluation.

There is some duplication of code with --add-root, but abstracting over both is complicated by --add--root using successive numbering for results instead of putting them in a folder and it outputting paths to the GC roots instead of the store paths.

At this point, especially since this is my first PR to Nix, and I'm not really familiar with C++, I'm mostly looking for general feedback on chance of this feature in the abstract being merged, whether to change --add-root behavior (numbered outputs have always seemed strange to me since there's potentially garbage left over with successive invocations), and general direction of implementation.

@infinisil
Copy link
Member

Neat! I think this would fix #719

@ghost
Copy link
Author

ghost commented Sep 5, 2019

Neat! I think this would fix #719

That's the intent, thanks for linking! I was planning to make appropriate changes to nixos-rebuild if this gets merged, potentially also rooting build time dependencies of the derivations evaluation depends on to improve the situation even further.

@Ninlives
Copy link
Contributor

Ninlives commented Mar 20, 2020

Any progress for this pr? I too think gc conflicts with IFD, especially for regions without good internet connections :/

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants