-
Notifications
You must be signed in to change notification settings - Fork 8
Other modules are not loaded #71
Comments
This happens even if all code can compile successfully. |
And even though it says it could not load the modules, it actually loaded them since I can type check symbols from other modules. |
Aight, so I can just |
Okay, so I'm a little confused about what's going on here exactly, but there are two distinct messages you're seeing. The first one,
is a warning from cabal. It loads the modules, but complains those aren't listed in The second one,
actually complains about an error in Unless this is a subtle error in environment set-up that ide-haskell-repl performs on start, this doesn't seem to be an issue with the package itself? I'm not sure where I could start with investigating this. If you could construct and publish a testcase that would help a lot. |
@lierdakil You can reproduce the issue by opening the REPL in this project: https://github.com/fairy-tale-agi-solutions/haskell-editor-setup You can ignore the compile issue, as I said it's not important and the message about the other modules not being loaded will be displayed regardless. Project above is configured to build with Nix, but I guess you can use cabal for it also and hopefully it will also help reproduce the bug. If there is anything I can do on my machine to help you figure it out that would be great. |
Ah, this actually affects functionality since when reload on file save is active the message pops up again on each reload. |
@lierdakil is there any easy way to copy the messages displayed by the ide-haskell-repl? Like the message mentioned above. When I try to select the text nothing happens. And there is no copy option in the right click menu. |
Are you perchance using ide-haskell-repl without ide-haskell? Because with ide-haskell, repl messages are displayed in "repl" tab in ide-haskell panel, which is selectable. |
Probably so. If I'm correct in my guess, then I've published v0.9.5 which makes the error div selectable (this was an oversight on my part) |
As for the rest, I've failed miserably at building the project. It builds with So if you're willing to debug this on your side, that's probably a faster option. To start with, I'd like to see if ghci runs the way one would expect it to, where one would expect it to. The easiest way to check this is to tap oldspawn = require('child_process').spawn; require('child_process').spawn=function(...args){console.log(...args); return oldspawn(...args);} After that, open REPL and look at console output. I expect to see something like
The one I'm the most curious about is As a side note, I'm genuinely curious about how you've set up your environment to let cabal pick up on nix-shell stuff. |
@lierdakil thank you for the quick update, now I can copy paste the messages shown by the extension |
Yeah, for some reason ide-haskell was not installed and I do not recall why. Might have been some clash with haskell-ide-engine plugin maybe. After I installed it then the message was no longer shown inside the extension and was shown under error/repl in IDE-Haskell tab like you said. |
@lierdakil I forgot that the build would require some steps which are not documented such as pointing |
It's spamming lot of:
Using Going to write documentation on how to build the project soon but if you want to give it a try, the basic steps I mentioned above. |
After enabling
seems to have actually be accurate that it could not find them for usage in the REPL. |
Well, that's certainly unexpected =\
No, what I was asking is this: at least on my system, cabal fails to find a lot of external dependencies (i.e. non-Haskell libraries like webkitgtk) when run under nix-shell, despite those dependencies being in the nix-shell environment. So while building with nix-build might work fine, running something like |
@lierdakil If you use steps I mentioned above then |
Extension is set to use
cabal-v2
Running cabal v2 repl in terminal correctly loads other modules.
When opening the extension following message is shown:
The text was updated successfully, but these errors were encountered: