Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

stack build package:exe:exe1 always build all executable targets in cabal file #2219

Closed
cranej opened this issue May 31, 2016 · 1 comment
Closed

Comments

@cranej
Copy link

cranej commented May 31, 2016

I expect it to build only the component I specified, but stack always build all. My cabal file:

executable experiment 
  main-is: experiment.hs  
  -- ...            
executable person 
  main-is: person.hs
 -- ...

Build command: stack build handy-tools:exe:person

Output:

handy-tools-1.0.0.0: configure
Configuring handy-tools-1.0.0.0...
handy-tools-1.0.0.0: build
Preprocessing executable 'experiment' for handy-tools-1.0.0.0...
[1 of 1] Compiling Main             ( experiment.hs, .stack-work\dist\2672c1f3\build\experiment\experiment-tmp\Main.o )
Linking .stack-work\dist\2672c1f3\build\experiment\experiment.exe ...
Preprocessing executable 'person' for handy-tools-1.0.0.0...
[1 of 1] Compiling Main             ( person.hs, .stack-work\dist\2672c1f3\build\person\person-tmp\Main.o )
Linking .stack-work\dist\2672c1f3\build\person\person.exe ...

OS: Windows 10
Stack Version: 1.1.2

This project was not created by stack new, it's created by cabal.

@mgsloan
Copy link
Contributor

mgsloan commented May 31, 2016

Known issue, unfortunately, see the gnarly story here: #1406

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants