Skip to content

Dependency solver allows cycles between packages and their setup scripts. #4161

Closed

Description

@sebright

I noticed this while debugging #4154.

example.cabal:

name: example
version: 1
cabal-version: >= 1.2

custom-setup
  setup-depends:
    example

library
$ cabal new-build --dry-run -v3
[...]
Resolving dependencies...
targets: example
constraints: 
  base installed (non-upgradeable package)
  ghc-prim installed (non-upgradeable package)
  integer-gmp installed (non-upgradeable package)
  Cabal >=1.20 (new-build's support of Custom Setup (issue #3932))
  example ==1 (user target)
preferences: 
  example [TestStanzas,BenchStanzas]
  ADPfusion <0.4.0.0 || >0.4.0.0
  [...]
  yocto >=1
  zip-archive <0.2.3 || >0.2.3 && <0.2.3.1 || >0.2.3.1
strategy: PreferLatestForSelected
reorder goals: False
count conflicts: True
independent goals: False
avoid reinstalls: False
shadow packages: False
strong flags: False
max backjumps: 2000
[__0] trying: example-1 (user goal)
[__1] next goal: example-setup.example (dependency of example-1)
[__1] trying: example-setup.example~>example-1
[__2] done
internal error: could not construct a valid install plan.
The proposed (invalid) plan contained the following problems:
Package example-1 has an invalid configuration, in particular:
the package has a dependency example -any but no package has been selected to
satisfy it.

Proposed plan:
Configured example-1

CallStack (from HasCallStack):
error, called at ./Distribution/Client/Dependency.hs:705:33 in
main:Distribution.Client.Dependency

The solver should keep searching, because it might be able to avoid the cycle in some situations.

Activity

  1. added 4 commits that reference this issue on Jan 13, 2018
    4d1470f
    fdee998
    38c8035
    53b2dc6
  2. added a commit that references this issue on Jan 21, 2018
    b536275
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions