With paket pack and paket.template, and using ~> #{version}, https://www.nuget.org/packages/Suave/2.3.0-beta depends on wrong versions; too constrained. I'd like to do a semver dependency. Is there a squiggly for that? (Besides (3, 4.0])?
@haf is it not working as documented in https://fsprojects.github.io/Paket/nuget-dependencies.html#Pessimistic-version-constraint?
It is. But that's not a semver dependency. I'm just asking if that wouldn't be a nice feature?
I always thought '~> 1.0' is exactly that?
But you probably want to cap the version below to the currently built-with version but the upper end should be major+1 exclusive. I'm talking about generating nugets with paket now.
As far as I know at the moment you can achieve what you want' by explicitly defining the range. For example:
nuget DotLiquid >= 2.0.174 < 3.0 will result dependency x >= 2.0.174 && x < 3.0
So what you are asking for is a shortcut/syntax for creating dependencies from a given version to the next major? Something similar to the current "twiddle-waka" which will yield a "Pessimistic version constraint", but so that it'll always cap the upper boundary to the next major, even if minimum would be a patch version.
So for example a new operator ~>> ("twiddle-waka-waka" is that then ;)) that would do just that. Broken into examples below (I'll show the difference to related "twiddle-waka" results also):
nuget DotLiquid ~>> 2.0.174 # results x >= 2.0.174 && x < 3.0
nuget DotLiquid ~> 2.0.174 # results x >= 2.0.174 && x < 2.1
nuget DotLiquid ~>> 2.0 # results x >= 2.0 && x < 3.0
nuget DotLiquid ~> 2.0 # results x >= 2.0 && x < 3.0 (same result with both operators)
I really like the "twiddle-waka", but I have found myself longing for this other shortcut as well. As most of the times what I actually want is exactly what described here (I want to have at least a specific patch and am happy to upgrade to anything up to the next major as the given nuget mainter has promised to follow SemVer).
This could probably be labeled as "enhancement"? Or should I make a distinct issue requesting the proposed new operator?
Yes; @Gonnagle that's a good idea, but I think this issue already requests that operator, don't you?
Most helpful comment
As far as I know at the moment you can achieve what you want' by explicitly defining the range. For example:
nuget DotLiquid >= 2.0.174 < 3.0will result dependency x >= 2.0.174 && x < 3.0So what you are asking for is a shortcut/syntax for creating dependencies from a given version to the next major? Something similar to the current "twiddle-waka" which will yield a "Pessimistic version constraint", but so that it'll always cap the upper boundary to the next major, even if minimum would be a patch version.
So for example a new operator
~>>("twiddle-waka-waka" is that then ;)) that would do just that. Broken into examples below (I'll show the difference to related "twiddle-waka" results also):I really like the "twiddle-waka", but I have found myself longing for this other shortcut as well. As most of the times what I actually want is exactly what described here (I want to have at least a specific patch and am happy to upgrade to anything up to the next major as the given nuget mainter has promised to follow SemVer).