-
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 attempts to load a removed module #1805
Comments
That definitely sounds like a bug. I think at one point it was the other way around (where modules left out of the .cabal file but referenced by source files wouldn't get loaded), but this is going a bit too far :) Does running |
I cannot reproduce the issue: https://gist.github.com/mgsloan/1b30acd0de8b57f1d014 . Does the thing I tried work for you? What's different about your setup? Like @borsboom mentioned, are you passing in |
In my case, the code wasn't buildable. It contained some errors that I was going to fix with the help of ghci. So, I guess stack did try to build it but failed. |
Yup, that explains it! Perhaps for the GHCI case we could have it skip any unlisted module which can't be found on the file system. In any case, we could make the warning in case of failed pre-GHCi build more clear that there can be inconsistent results. |
+ Fully resolves #921, where unlisted module warnings were being emitted for deleted modules
Fixed! |
If you remove a module from a project and erase all mentions of it from the cabal file and other source files,
stack ghci
may still attempt to load it (and fail).This happens because
Stack.Package.getDependencies
will resurrect the dead module name from a stale interface file.I don't really know what to do about this, but it sure was annoying and took me quite some time to figure out.
The text was updated successfully, but these errors were encountered: