-
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
Different behaviour when using "stack build "pkg"" and "stack build" to implicitly build the pkg #1561
Comments
Seeing this too right now with my own package which builds C++ files as well as Haskell.
I tried to build the package with cabal, and it turns out that there's a compile error in C++, and gcc prints out a message mentioning paths to some C++ header files (actually
|
Ah interesting, I looked at the log when building with cabal and I get this message at the same place where the error comes when using 'stack build bindings-llvm'
I see this warning in the log when implicitly building the package, by calling 'stack build' in the parent directory. So it seems that stack handles warnings differently when building the package implicitly as dependency or directly. Also warnings should be ignored by default, no? And the log message is not really helpful. |
I've committed a change that should fix this. Please try it and close the issue if so. The problem was that the exception handling for resolving paths in warning messages was incorrect, and it would crash if it encountered a bad path instead of just passing it through unchanged. For warnings, this didn't effect multi-package builds because the build log is only shown if there is an error, so it would never try to resolve the paths in the warnings (whereas single-package builds do always show the warnings). |
@borsboom With latest version of stack the issue is gone for me. Cool! |
It works for me too, thank you! I'm closing the issue |
I'm trying to build an existing project, that has dependencies which are provided by github links, with stack and I encountered following:
When build the project with
stack build
the dependency seems to build fine, I get following in the in the end of the buildlog:When however running
stack build bindings-llvm
I get following error:and the package does not build. I get the same, when cloning the repo of the dependency from github and try to build it with
stack. Shouldn't
stack build $pkg
and implicitly building the package withstack build
yield the same results?Any help is appreciated! Thanks in advance,
--Simon
The text was updated successfully, but these errors were encountered: