Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Use single session per stack project #1174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

corngood
Copy link

I have a stack project with a few local packages that I work on together. I found that haskell-mode would create a stack ghci process/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)

@corngood
Copy link
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.

@gracjan
Copy link
Contributor

gracjan commented Feb 22, 2016

Looks good to me. Ping us when you finish.

@corngood
Copy link
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.

@purcell
Copy link
Member

purcell commented Oct 22, 2017

See also #1547.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants