[WIP] Use single session per stack project#1174
Open
corngood wants to merge 1 commit intohaskell:masterfrom
Open
[WIP] Use single session per stack project#1174corngood wants to merge 1 commit intohaskell:masterfrom
corngood wants to merge 1 commit intohaskell:masterfrom
Conversation
Author
|
TODO: The directory for the ghci buffer ends up being set to the project where it is first created. It doesn't seem to matter to stack ghci, but having it run in the root of the stack project would be cleaner. |
Contributor
|
Looks good to me. Ping us when you finish. |
Author
|
It's working for my purposes, but it may be complicated by certain things assuming there is a cabal-dir per session (e.g. tag generation). I'll dig into it a bit more, but it's not as close to complete as I hoped. I'll let you know. |
Member
|
See also #1547. |
Collaborator
|
I support the idea behind this idea, would be great. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have a stack project with a few local packages that I work on together. I found that haskell-mode would create a
stack ghciprocess/buffer for each project, and each one would load all the projects, as stack ghci does.This change defaults each module under the stack project to the same ghci instance.
What do you think? I haven't had any problems with it, and it saves a ton of memory for ghci processes, as well as simplifying work on multiple packages.
WIP because the buffer name is inconsistent with cabal, but using the package name on its own seems kind of fragile too... Maybe it should be the full path to the stack.yaml / .cabal with some sort of prefix?
TODO: share the file logic with (haskell-process-type)