haskell / haskell/cabal

[nix-local-build] Garbage collecting the store

Open
#3,333 13 comments 8 reactions 0 assignees View on GitHub
cabal-install: v2-build system GSoC project candidate re: store-dir type: enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.