-
Notifications
You must be signed in to change notification settings - Fork 711
new-build doesn't build tests even when given --enable-tests #3996
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
Comments
Example log:
The |
I think I've seen the same behaviour in a couple other packages. The behaviour appears to be that there's some problematic package and then one pass or other (probably the pruning of the plan to the targets) prunes everything that depends on that problematic package. This may be due to a dep closure failure being treated incorrectly (returning [] rather than failing), or something similar. The same problem can be observed in the binary-serialise-cbor package, with one of the test suites that depends on the So I suggest tracing the planning code that does the pruning to targets, and perhaps adding some sanity check before pruning to check we don't have any dangling deps or other weirdness. |
Yeah, uh, we should not do that ;) |
It turns out that the install plan elaboration is constructing cyclic plans in some cases. The effect is that executing the plan simply misses out anything that depends on the packages involved in the cycle. This is probably the cause of haskell#3996 With this patch such cases will fail with an assertion such as: internal error in InstallPlan.fromSolverInstallPlanWithProgress: The following packages are involved in a dependency cycle hspec-discover-2.3.1-da63d0b4e952e7949a113646e4af0aac925a4d864a1db650.. The cause is clearly in the caller of fromSolverInstallPlanWithProgress and the only caller of that is ProjectPlanning.elaborateInstallPlan. The problem appears to be to do with the intra-package dependencies.
So I think I have a diagnosis. At least it's a diagnosis for a similar problem that I can reproduce. It's incorrect construction of the elaborated plan in the first place (cycles). |
In the old code, we assumed that only libraries could get installed, but with executable dependencies this is no longer true. Handle it correctly. This bug caused cycles in the elaborated install plan which could cause dependency closure to fail, resulting in weird errors. Fixes haskell#3996. Signed-off-by: Edward Z. Yang <[email protected]>
In the old code, we assumed that only libraries could get installed, but with executable dependencies this is no longer true. Handle it correctly. This bug caused cycles in the elaborated install plan which could cause dependency closure to fail, resulting in weird errors. Fixes haskell#3996. Signed-off-by: Edward Z. Yang <[email protected]>
This is with current master. When I try to compile
bloodhound
's test suite withnew-build --enable-tests
it compiles all dependencies correctly, but ignores the actual test suite. Subsequent attempts to runcabal new-build
have no effect,new-build tests
doesn't work either. Maybe has something to do withbloodhound
usingbuild-type: Custom
.The text was updated successfully, but these errors were encountered: