-
Notifications
You must be signed in to change notification settings - Fork 842
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 fails to properly isolate multiple executables #1038
Comments
This is an upstream cabal issue, see: |
With cabal-install the way this works for me is I go into the package folder (where the cabal file lives) and just run |
Actually, it does work: the install phase is failing, but your executable is present in the dist directory inside .stack-work. If this is really a problem for some workflow, we can add a --skip-install flag. |
It's not building the binary I requested because it's trying to install the other binary first and failing because it doesn't exist. Does the install resulting from the build just try to install all possible binaries instead of just the one I requested? |
I don't think that assessment is correct, have you looked in the dist The bug is that cabal expects all executable to be present for the On Thu, Sep 24, 2015, 3:59 PM Luke Hoersten [email protected]
|
The It definitely looks like, based on the output I pasted initially, that it gets to the point of linking the binary I want and then going on to trying and failing to install the other binary, killing the whole process. We should probably avoid adding a flag unless we know for sure what's preventing the binary from being produced in |
Is the package you're building perhaps in a subdirectory? Are you looking On Thu, Sep 24, 2015, 4:09 PM Luke Hoersten [email protected]
|
Yup it's there in the subdir. I was just looking in the dist dir form the stack output. Thanks Michael. So then the only thing left to consider is the no-install flag which at this point is less critical for me. |
With a
.cabal
file that has more than oneexecutable
(executableA
andexecutableB
in my example below) section and astack.yaml
with more than one package, running:stack build package:executableA
should build only that binary and it's dependencies.
What's wrong here is that nothing depends on executableB and it should not need to be installed. Furthermore it wasn't built (correctly because I said to only build executableA) so I don't know why it's trying to grab it.
The text was updated successfully, but these errors were encountered: