ghciwatch
ghciwatch copied to clipboard
[DUX-1292] Multi-project Stack support
With a multi-project Stack workspace, Stack will ask the following question instead of starting up ghci
immediately. This breaks the prompt-matching automation.
* * * * * * * *
The main module to load is ambiguous. Candidates are:
1. Package `app' component exe:app-example with main-is file: /Users/rvion/dev/cogito/app/Main.hs
2. Package `pghs' component exe:pg2hs with main-is file: /Users/rvion/dev/cogito/pghs/Main.hs
You can specify which one to pick by:
* Specifying targets to stack ghci e.g. stack ghci app:exe:app-example
Specify main module to use (press enter to load none): Not loading any main modules, as no valid module selected
* Specifying what the main is e.g. stack ghci --main-is app:exe:app-example
* Choosing from the candidate above [1..2]
* * * * * * * *
https://github.com/ndmitchell/ghcid/issues/57
Implementation outline:
- The
IncrementalReader
will need to be modified to return which pattern it found to delimit a chunk of lines. -
GhciStdout::initialize
will need to be modified to look for the above prompt as well as theghci
version announcements.
From SyncLinear.com | DUX-1292