You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2457 added a change to load packages individually. This has caused some non-ideal behavior when loading multiple packages into ghci / intero. Also, I've observed that the approach doesn't work in general, its success is non-deterministic. In particular:
This causes it to output "Ok, modules loaded: " messages N types, where N = number of packages.
If an error occurs, it can be repeated upto N times, filling up your console with duplicated errors.
It doesn't order the packages based on dependency order, so if package A is before package B in the list, and A depends on B, by the time it asks to load B's modules, they've already been loaded. So sometimes the source path setting doesn't work. So, the primary motivation for that change doesn't always work.
Intero re-collects type info for every load statement. This is probably an issue with intero. But since it is
The setting of cwd does not replay on reload.
So generally, that change was a major downgrade in how stack ghci behaves, and it does not really properly support switching cwd.
I'm working on a change to go back to pretty much how scripts were generated before, this is documenting the motivation for the change. It will still benefit from :cd-ghc in the case that intero is just loading one package, which I believe is the default in emacs
The text was updated successfully, but these errors were encountered:
@mgsloan, while dogfooding with the latest stack, I discovered that the default stack ghci doesn't load up any modules any more. I tried stack ghci --load and nothing was loaded either. I found my way here - do I understand correctly that this change shouldn't affect this default behavior? Maybe I'm on the wrong track too though.
Here's my log:
λ ~/hobby/stack/ master stack --version
Version 1.5.1, Git revision e6fde2ef177dd31d4d68bb204d4e0dc3c3920f81 (5118 commits) x86_64 hpack-0.18.1
λ ~/hobby/stack/ master stack ghci
Configuring GHCi with the following packages:
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :?forhelp
Loaded GHCi configuration from /home/lwm/dotfiles/dotfiles/ghc/ghci
Loaded GHCi configuration from /tmp/ghci20785/ghci-script
λ :show modules
λ :load src/Stack/Upload.hs
[1 of 1] Compiling Stack.Upload ( src/Stack/Upload.hs, interpreted )
Ok, modules loaded: Stack.Upload.
λ :show modules
Stack.Upload ( src/Stack/Upload.hs, interpreted )