Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-5219

Add support for inclusion/exclusion in VersionRange

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.0.2, 5.1
    • None
    • None
    • None
    • Yes

      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.

        Acceptance criteria

              gjoseph Magnolia International
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: