[nix-local-build] Garbage collecting the store
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
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 https://github.com/haskell/cabal/issues/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.
Contributor guide
Assessment
This issue has not been assessed yet.