commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

Detecting newly created modules in a project #51

Closed lukexi closed 8 years ago

lukexi commented 9 years ago

Stack-IDE currently complains Could not find module ‘MyModule’ if I create a new module in an already-loaded project, add it to other-modules in the cabal file and try to import it. Is there a way to get it to pick it up (beyond restarting, which I'm currently doing manually to work around)?

chrisdone commented 9 years ago

I was thinking of adding this to the load command. When doing update targets, the IDE could send along with it the current file it wants to load, and if that's not in the set of targets, add it.

chrisdone commented 8 years ago

This command is now added as stack ide load-targets <package-name>. This can be used to initially figure out the modules to load, and to update to modules newly added to the Cabal file.