Description
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
Fix inconsistent ~> LOCKEDVERSION twiddle range for short version str…
github-actions commentedon Aug 30, 2026
🤖 This is an automated response from Repo Assist.
I've root-caused this: the bare
LOCKEDVERSION/CURRENTVERSIONplaceholder substitutes the raw, un-normalized locked version text (e.g."0.68") rather than a normalizedMajor.Minor.Patchform. Since~>infers which segment to bump from the number of numeric fragments present, a 2-segment locked version like0.68and a 3-segment version like0.68.1get treated differently by the twiddle operator, producing the inconsistent ranges reported here.I've opened a draft fix that normalizes the substituted version to at least 3 segments before it reaches the
~>parser, with regression tests covering 2-segment, 3-segment (explicit.0), and 3-segment (non-zero patch) cases. A maintainer will need to review and merge.Add this agentic workflow to your repo
To install this agentic workflow, run