[MAGNOLIA-5219] Add support for inclusion/exclusion in VersionRange Created: 05/Aug/13  Updated: 27/Sep/13  Resolved: 05/Aug/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.2, 5.1

Type: New Feature Priority: Neutral
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Release notes required:
Yes
Date of First Response:

 Description   

The VersionRange class (used among other for module dependencies) currently supports a very simple syntax:

  • * - includes all versions
  • 1.2 - matches only 1.2 exactly
  • 1.2/* - matches all versions including and above 1.2
  • 1.2/1.2.9 - matches all versions including and between 1.2 and 1.2.9

It'd be beneficial to be able to exclude versions in a range - currently, if you want to specify a dependency as "1.* but not 2.0", you can only use 1/1.999, which isn't elegant.. nor safe. We could support the following syntaxes - "math"-style, and Maven style:

  • [1.2,1.2.9] - inward square brackets mean inclusion
  • [1.2,1.2.9[ - outward square brackets mean exclusion
  • [1.2,1.2.9) - parenthesis mean exclusion

Maven style is described here:

I currently don't see a use for supporting multiple sets, although it could be useful to avoid a specific, known-buggy, version.



 Comments   
Comment by Magnolia International [ 05/Aug/13 ]

I have a working implementation for this (minus the multiple-sets syntax), just holding up my commit until I know we need this in 5.0 or 5.1

Comment by Magnolia International [ 05/Aug/13 ]

Done and merged to master.
Currently does not support "multiple range sets". Please open a separate issue if this is needed.

Comment by Antti Hietala [ 27/Sep/13 ]

Documented in http://documentation.magnolia-cms.com/display/DOCS/Module+management#Modulemanagement-Moduledependencies and in 5.1 release notes.

Generated at Mon Feb 12 04:03:06 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.