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

stack build package:lib still builds exes #2366

Closed
mitchellwrosen opened this issue Jul 11, 2016 · 1 comment
Closed

stack build package:lib still builds exes #2366

mitchellwrosen opened this issue Jul 11, 2016 · 1 comment

Comments

@mitchellwrosen
Copy link
Contributor

Reproducible example: https://github.com/mitchellwrosen/stack-issue

Here, the executable has a compiler error but the library does not.

Expected output of stack build stack-issue:lib: (successful build)

Actual output of stack build stack-issue:lib:

stack-issue-0.0.0: build
Preprocessing library stack-issue-0.0.0...
In-place registering stack-issue-0.0.0...
Preprocessing executable 'exe' for stack-issue-0.0.0...
[1 of 1] Compiling Main             ( Main.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/exe/exe-tmp/Main.o )

/home/mitchell/junk/stack-issue/Main.hs:3:1:
    Parse error: naked expression at top level
    Perhaps you intended to use TemplateHaskell

--  While building package stack-issue-0.0.0 using:
      /home/mitchell/.stack/setup-exe-cache/x86_64-linux/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-1.22.5.0 build lib:stack-issue exe:exe --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
@sjakobi
Copy link
Member

sjakobi commented Jul 14, 2016

Thanks for the example project! 👍

This is a known and long-standing issue, so I'm closing this a duplicate.

A PR to fix this would be most welcome! :)

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