Make stack-ide receive a path where the correct ide-backend-server is installed #657
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NB. See this pull request, which would first need to be applied to
stack-ide
.This PR would be a step into having
stack
provide the appropriate version ofide-backend-server
to each project wherestack-ide
is used.What the patch does is simply make
stack-ide
look foride-backend-server
andide-backend-exe-cabal
in thebin
directory of the local and snapshot databases, respectively. If, for every project, one can then persuadestack
to buildide-backend-server
andide-backend
in addition to the project packages, then one gets the right ghc-version ofide-backend-server
for free. At the moment, I achieve this rather crudely by adding the following package entry in thestack.yaml
file of every project I want to work on:I imagine the stack.yaml format being then extended to allow for a non-project config option that would roughly say: "when building a project for development, also build these packages". That way one could put an entry for
ide-backend-server
in~/.stack/stack.yaml
and forget about it (it would be also handy to include other "ide tools" there, such ashlint
,HaRe
,hindent
, etc.). Does a setting like that make sense to you?Anyway, already with the crude version I'm now using, my experience with the Sublime plugin (https://github.com/lukexi/stack-ide-sublime) has improved quite a bit: I just need to remember to paste the above package entry the first time I work on a project, rebuild and everything then just works (if I switch resolvers, change versions of ghc, etc., I just need to restart Sublime).