Closed seagreen closed 5 years ago
This addresses the "install executables with different names" part of https://github.com/alexwl/haskell-code-explorer/issues/23
:warning: I'm not sure this is the solution we'll want to go with, just throwing it out as an idea. I went ahead and opened a pull request so that we'll have a nice diff to look at though.
(Also I see now that you self-assigned that issue. Hopefull you meant just the "version mismatch checker" and not the whole thing. If not sorry to step on your toes!
(Also I see now that you self-assigned that issue. Hopefull you meant just the "version mismatch checker" and not the whole thing. If not sorry to step on your toes!
Yes, I meant just the GHC version checker (it should solve the problem with the confusing error message).
The install script is a great addition to the project. It makes it much more convenient to use multiple versions of haskell-code-indexer
at once.
Thank you!
Sure thing.
Btw I like your changes dropping the Shake dependency and making the dependencies explicit :)
Eg (given that my local bin path for the project is set to ./.bin in my stack.yaml):
Note that it works by installing and then moving the
haskell-code-indexer
executable in your project's bin tohaskell-code-indexer-X-Y-Z
. So if you already have a plainhaskell-code-indexer
executable before the run it will be deleted.It uses plain IO instead of Shake because Shake runs actions in unpredictable order. One of the goals of the script is that it will install haskell-code-server and the latest haskell-code-indexer as soon as possible, so that it's useful even if you have to cancel the run for some reason. Shake was running the haskell-code-indexer command at the correct time, but then waiting to copy it to its -X-Y-Z final home until near the end of the run.
(Also this is really just a simple install script, we don't need another layer of caching from Shake for it.)