Open
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 #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.