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

Tracking cabal executables #28

Closed
lukexi opened this issue Jul 18, 2015 · 9 comments
Closed

Tracking cabal executables #28

lukexi opened this issue Jul 18, 2015 · 9 comments

Comments

@lukexi
Copy link
Contributor

lukexi commented Jul 18, 2015

I noticed that stack-ide doesn't seem to track files in executable targets (i.e. when I run stack ide myproject it only compiles/reports errors for the "library" section of the cabal file). Is there a way to do this?

(including test-suites would be great too)

@mgsloan
Copy link
Contributor

mgsloan commented Jul 18, 2015

I believe this has the same root cause as commercialhaskell/stack#347

While this isn't mentioned there, one thing to try might be to add an other-modules list for the executable. Not sure if that'll fix it, but cabal does support this field for executables / test-suites, though it doesn't demand it.

@drwebb
Copy link

drwebb commented Aug 17, 2015

I have the same issue when writing tests (really sucks for TDD). I'm on emacs and stack-mode properly load my tests module either when I run stack-load-buffer.

Since commercialhaskell/stack#753 I've been able to run stack ghci <packagename>:exec:<executable compenent>. Could the new way stack ghci finds dependencies be added some way to stack-ide?

@bixuanzju
Copy link

For the moment, I am adding an other-modules list for the executable to workaround this, works for me.

@chrisdone
Copy link
Member

I added support for this in stack ghci. I'll add it to stack-ide soon.

@rvion
Copy link

rvion commented Aug 17, 2015

as usual, big thanks !

@carymrobbins
Copy link
Contributor

So does stack-ide only support library components currently?

@chrisdone
Copy link
Member

No, it just needs a way in its UI to disambiguate Main modules between components.

@chrisdone
Copy link
Member

#63

@chrisdone
Copy link
Member

Closing as dupe of #63 which describes the point accurately.

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

7 participants