commercialhaskell / commercialhaskell/stack
Garbage collect generated library binaries
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
I was quite surprised to find that `$(stack --local-install-root)/lib` and `$(stack --dist-dir)/build` have a `.a` and `.so` for every single build of my library. This is a rather unfortunate consequence of the new package key stuff in GHC 7.10, though I suppose this would also happen to some degree before, whenever you change the version number of your package.
When unregistering packages, we should also delete all of the associated files from these directories.
When this change gets implemented, I also propose that it detect when an old stack had been used before, and first do a `stack clean`. People may not realize that they have directories full of tons of old compilation results.
Contributor guide
Assessment
This issue has not been assessed yet.