Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Different behaviour when using "stack build "pkg"" and "stack build" to implicitly build the pkg #1561
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
When however running
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
Any help is appreciated! Thanks in advance,
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).