-
Notifications
You must be signed in to change notification settings - Fork 841
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
'stack ghci' doesn't notice that a module got deleted #1180
Comments
In general stack ghci doesn't seem to like it when modules come and go. I often get "panic: the "impossible" happened!" when stack ghci is running and I try adding or deleting modules. Maybe that's to be expected (? I don't know how stack ghci interacts with cabal really) but it's still annoying. |
@chreekat is that Stack-specific? As I understand it (but I'm not much of a GHCi user), once you're actually in the GHCi interpreter, Stack has fully passed control to it and is no longer involved at all. This particular issue was about the list of modules that was passed to GHCi on startup, and should now be fixed on master. |
@borsboom probably not stack-specific, in fact. :) |
Before this change, 'stack ghci' would ask the user a question after doing a build which may take a long time. The reason it was this way is that the question required resolution of package files, and package file resolution needed to come after the build due to #1180. The solution here is to resolve the package files twice - once before the build - and once after. This isn't the most efficient solution possible, but it is a much better user experience to ask the main target question before building rather than after.
Before this change, 'stack ghci' would ask the user a question after doing a build which may take a long time. The reason it was this way is that the question required resolution of package files, and package file resolution needed to come after the build due to #1180. The solution here is to resolve the package files twice - once before the build - and once after. This isn't the most efficient solution possible, but it is a much better user experience to ask the main target question before building rather than after.
If you remove a module and then run
stack ghci
beforestack build
, it fails with aCould not find module
error.Hypothesis:
The build doesn't run before
stack ghci
reads the modules, so it doesn't get a chance to re-write the .dump-hi files with the updated information (that the module does not exist), sostack ghci
is still reading the out-of-date information.Notes from @chrisdone:
It's likely that fixing #1065 will also fix this, but tracking separately since the symptoms are different.
(PAT-125)
The text was updated successfully, but these errors were encountered: