Skip to content
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

No modules loaded on startup for multi-module project #82

Closed
rdnetto opened this issue Aug 17, 2017 · 3 comments
Closed

No modules loaded on startup for multi-module project #82

rdnetto opened this issue Aug 17, 2017 · 3 comments

Comments

@rdnetto
Copy link
Collaborator

rdnetto commented Aug 17, 2017

Steps to reproduce:

  1. Open a file in a project with multiple module
  2. Observe that no module are loaded in Intero, and that g:intero_load_targets = []
  3. Run :InteroSetTargets and select nothing.
  4. Intero will restart and load all the modules, and g:intero_load_targets will list all of them.

Expected behaviour:
All the modules should be loaded even if none are specified.

Additional notes:

  • This is likely a bug in Stack, since stack ghci --help says that all modules should be loaded if none are specified
  • We could workaround this by invoking the same logic as InteroSetTargets on startup, but this is quite expensive (1.7 sec), so it would be preferable to fix this upstream
    • it's not obvious why this is so expensive, when it should just be parsing the cabal file. This may be worth investigating.

Stack version:
Version 1.5.1, Git revision 776b55f2281e41e89b926eaa529a54a7f4ad20bb (5079 commits) x86_64 hpack-0.17.1
(This is from master, so I should probably repro on a released version)

@rdnetto
Copy link
Collaborator Author

rdnetto commented Aug 20, 2017

Note: this may be related to commercialhaskell/stack#3310

@decentral1se
Copy link
Contributor

I think this is now solved with commercialhaskell/stack@87d826a.

@rdnetto
Copy link
Collaborator Author

rdnetto commented Sep 3, 2017

Awesome, can confirm it's fixed in Stack Version 1.5.1, Git revision fa258ed3ba6c078e95bdf6accfd3d866b683185f (5175 commits) x86_64 hpack-0.18.1.

(If anyone else runs into this, you'll need to checkout the latest Stack and stack install it until there's a release with the fix)

@rdnetto rdnetto closed this as completed Sep 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants