You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
many package manager support as version constraints also caret ^ and tilde ~:
^2.3.4 allows changes that do not modify the major digit (e.g.: 2.9.1 is ok, 3.0.0 is ko)
~2.3.4 allows for changes that increase only the patch digit (e.g.: 2.3.5 is ok, 2.4.0 is ko)
(specific semantics is up to the package manager, e.g. npm has slightly more complex semantics)
This would allow to specify library dependencies in a more specific way, supporting the semver standard.
Instead, as far as I know, currently constraints only supports generic "greater-than" et similar.
If accepted this proposal, also the package installation tools should be updated accordingly (e.g. arduino-cli).
Regards
Describe the current behavior
As far as I know, currently constraints only supports generic "greater-than" et similar, preventing to apply the semver standard.
The version constraints syntax is provided to Arduino CLI by the go.bug.st/relaxed-semver Go module. So any requests must be submitted to that repository. Any syntax provided by that module will also eventually be used by the Arduino library system.
You'll be glad to know that the ^ operator has already been added to that module: bugst/relaxed-semver#8. This means it is only a matter of time for that change to be released and then finally pulled into Arduino CLI when the a dependency version is bumped.
Maybe ^ alone is sufficient?
There is also a proposal for a change in the way constraints without operator are treated that you might be interested in reviewing: bugst/relaxed-semver#10. That PR also provides the missing documentation for the ^ operator.
As far as I know, currently constraints only supports generic "greater-than" et similar
The constraints syntax of the module is documented in its readme:
I felt that the way they are documented there, although completely appropriate for those using the modules directly, would not be very clear to those using them indirectly in Arduino library metadata, so I added equivalent documentation for the syntax as used in this specific application in the Arduino Library Specification:
Even though someone reading the documentation of npm and the "semver" package (which, despite the name, is an independent project from the semver specification) might be given the impression otherwise, the real semver specification doesn't say anything at all about constraints.
So it isn't accurate to say the absence of operators established completely separate from the specification does not mean that our syntax is not compliant with the semver specification.
thank you for the very complete reply. So I hope that caret and tilde will be available asap.
For the semver application, I mean the following. The main point of having samever is to know that a range dependency versions is compatible out of the box. This is important for example, to be able to update dependencies which provide bug fixes. But specify >= as a dependency constraint actually defeat this purpose, because allows also breaking changes, basically forcing to specify exact version matches and therefore, to perform a new release just to switch to a newer dependency version.
So, even if I agree to what you said about semver (what you said is totally true), imho this is a huge issue in the convenience of semver applying (as using something very powerful in a very limited way).
Describe the request
Hi,
many package manager support as version constraints also caret
^
and tilde~
:^2.3.4
allows changes that do not modify the major digit (e.g.:2.9.1
is ok,3.0.0
is ko)~2.3.4
allows for changes that increase only the patch digit (e.g.:2.3.5
is ok,2.4.0
is ko)(specific semantics is up to the package manager, e.g. npm has slightly more complex semantics)
This would allow to specify library dependencies in a more specific way, supporting the semver standard.
Instead, as far as I know, currently constraints only supports generic "greater-than" et similar.
If accepted this proposal, also the package installation tools should be updated accordingly (e.g.
arduino-cli
).Regards
Describe the current behavior
As far as I know, currently constraints only supports generic "greater-than" et similar, preventing to apply the semver standard.
Arduino CLI version
all
Operating system
N/A
Operating system version
all
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: