Skip to content

Support of caret and tilde in version contraints #1849

Closed as not planned
Closed as not planned
@FStefanni

Description

@FStefanni

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

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions