Skip to content

paket.template dependency ~> LOCKEDVERSION gives inconsistent behaviour for x.y.0 versions #3727

Description

@cmeeren

When the currently locked package version has patch = zero, using ~> LOCKEDVERSION in paket.template results in a package compatible with all packages up to the next major version. However, when the locked package has a non-zero patch number, the package is compatible with only versions up (and not including) to the next minor version.

This is causing some headache for me. I am trying to depend on Feliz. It's at 0.x, so I want to be compatible with the minor version I'm currently on. In my paket.dependencies I have simply

nuget Feliz

but the same happens for a specified version with zero patch:

nuget Feliz 0.68.0

In the lock file, this results in

Feliz (0.68)

In my paket.template, I have

dependencies
  Feliz ~> LOCKEDVERSION

And the final nuget package (created using paket pack) is now compatible with Feliz [0.68, 1.0.0).

However, if the locked Feliz version is, say, 0.68.1, then the final NuGet version compatibility is Feliz [0.68.1, 0.69.0) which is what I want.

I find it confusing that the end result depends in this manner on whether the currently installed version has a zero patch or not, so I consider this to be a bug.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions