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

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

Closed
wants to merge 1 commit into from

Conversation

hyperfekt
Copy link

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

@hyperfekt
Copy link
Author

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.

None yet

3 participants