Take the idea of build roots a bit more seriously
Build roots are very useful when dealing with a few different branches but the
I am proposing a new mode which takes the idea of build roots further:
- All build roots live in the same directory as each other so they are easy to clean en masse
- Each build root has metadata associated with which records the build settings which were used to build that root
- Switching to a new branch creates a new build root
(1) makes it easier to keep track of all the build roots which end up scattered around my
ghc/ folder. I have at least 10 currently (perhaps this i my own fault).
(2) When you come back to a branch after a while you have to remember what the build root was called and which options you used to compile it as otherwise you may as well start again.
(3) Reusing the same build root across two different branches is not good in my experience. If you make a mistake though then you ruin a different built root.
These problems are probably alleviated by the
--shared flag but that is too fragile to use currently.