Skip to content

[nix-local-build] Garbage collecting the store #3333

Open
@ezyang

Description

@ezyang

This is a bit of an interesting problem. On the one hand, it's intractable to determine the GC roots, because dist-newstyle "roots" may be scattered at arbitrary locations in the file system. On the other hand, so long as a library is not depended upon an executable which is being "used" (i.e., part of a profile, see #3332) then it is recoverable if we accidentally delete it: the next time someone runs new-build on the project, it will just get rebuilt. But this is not exactly a safe assumption; for example, I have a symlink to a binary in a new-dist directory (since I'm dogfooding Cabal); if I accidentally GC away a dynamic library it depends on I'll have to go and rebuild it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions