-
Notifications
You must be signed in to change notification settings - Fork 696
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
The "benchmark" target dependencies conflict with "executable" targets #1768
Comments
/cc @kosmikus This is a limitation of the dependency solver and it bites us in a bunch of different situations. :( Another example of when it bites us is when a cycle is created because a dependency of a test suite in turn depends on the main library. This happens in all core packages that are used by e.g. test-framework or criterion. |
BTW, I've just checked and the problem remains even when I change the target from |
Yes, the issue is that the whole package is considered as a unit for dependency resolution. |
@tibbe You've said repeatedly that this is a solver shortcoming, but I don't see the solver as the main culprit. Can we build individual components of packages out of order? If yes, I'm happy to try to make the necessary solver changes. |
@kosmikus Yes, I think we can and should consider each section (i.e. the lib, exes, test suites, and benchmarks) as separate units, with their own constraints, to build. |
Cabal has an internal component dependency graph. This information needs to be communicated to the solver. |
Closing as a duplicate of #1575. |
I have a package with the following structure:
The
criterion == 0.8.*
dependency conflicts withghc-datasize
and its impossible to compile having those two together. The issue with Cabal however is that neither thebenchmark
orlibrary
target hasghc-datasize
in dependencies, yet Cabal still considers it and does not allow me to compile thebenchmark
target. When I remove theexecutable
target, the compilation goes fine.I'm on
The text was updated successfully, but these errors were encountered: