Skip to content

Locking incorrectly claims that dependency is not installed #6944

Description

@sim642

I might be on a spree of opam locking issues this week...

At https://github.com/sim642/odep/tree/67ce57a013f342da49cdbe73025130d66cd06e12, opam 2.5.1 gives the following message:

$ opam lock .
[ERROR] Skipping odep.0.2.1, dependencies are not satisfied in this switch, not installed packages are:
          - opam-state (< 2.2.0~beta3)

No lock file generated

However, the opam switch I'm in is exported here: https://github.com/sim642/odep/blob/67ce57a013f342da49cdbe73025130d66cd06e12/odep.opam.exported#L79. It has opam-state 2.5.1 installed but opam lock somehow doesn't see this constraint in its entirety:

"opam-state" {>= "2.1.0" & (< "2.2.0~beta3" | >= "2.2.0")}

I thought that maybe it's still trying to lock based on the constraints of odep.0.2.1 in opam-repository, so I did opam pin odep.0.2.2 ..
This installed fine (opam-state was already installed), but opam lock . claims the same (except for odep.0.2.2 this time).

Activity

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions