-
Notifications
You must be signed in to change notification settings - Fork 841
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 doesn't rebuild internal build-tool-depends #5342
Comments
@sjakobi I get the expected result using the currrent |
@qrilka Many thanks for looking into this! :) Unfortunately there was a bug in the reproduction steps I posted, which I have since corrected. The last step must also be
|
Thanks, this way I could reproduce it. The main problem is that Cabal treats library and tool dependencies differently, there are some workarounds for this in Stack but probably not enough in this case. I will look a bit deeper later. |
@sjakobi I finally had another look into this and it looks like the main problem for Stack here is that there is a cross-component dependency in the same package: such dependencies are excluded in the current Stack plans as they lead to cycles. The way out is #4745 but that is an old issue, we still don't have a budget for it. I'd like to implement that issue but unfortunately I don't think I will be able to do it in my spare time. Sorry. |
Thanks, @qrilka, and no worries! :) Luckily this issue is fairly simple to work around:
It can be a pitfall though – if the executable is not rebuilt, one can end up testing an old version of the executable, which can be pretty confusing. |
General summary/comments (optional)
The
dhall-lsp-server
package has an integration test suite with a registered dependency on an executable of the same packageDocumentation for
build-tool-depends
stack test
should ensure that this executable is up-to-date before running the testsuite, but it doesn't.As a workaround one can specify the executable as a target with
stack test my-package:my-exe my-package:testsuite
.Steps to reproduce
Expected
stack test
fails while re-building the executableActual
stack test
doesn't re-build the executable, and runs the test suite with an outdated executable version.Stack version
Method of installation
stack upgrade
The text was updated successfully, but these errors were encountered: