stack path --stack-root
wants GHC installed; vicious cycle with CI caching
#6340
Labels
stack path --stack-root
wants GHC installed; vicious cycle with CI caching
#6340
All that
stack path --stack-root
should do is to print out the stack root directory.Nothing more. Because everything else is just making it behave worse.
Currently
stack path --stack-root
does tons of things before printing the stack root, and these things can fail, e.g. if no GHC is installed:https://github.com/agda/agda-language-server/actions/runs/6930512530/job/18850319673
What is stack doing here? I has given away the stack root in an error message:
But it can print it for me in a regular fashion? Instead, it insists on a operational system.
Why is it problematic that
stack path --stack-root
does its full "system operational" check at the beginning?Because one may need the stack root location to restore the "operational system" from a cache.
Before restoring, the system is simply not operational...
Stack needlessly constructs a vicious cycle here between needing the stack root to restore a cached GHC and needing a GHC to print the stack root. (Not sure if I should laugh or cry here.)
Request: make
stack path --stack-root
simply print the stack root and do nothing else.This will also bring the runtime of this command down by 3 orders of magnitude; it currently takes >1000ms on my system.
Here is a dump of what
stack path --stack-root
does on a specific project of mine:The text was updated successfully, but these errors were encountered: