Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,225
    • Issues 3,225
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #18060

Closed
Open
Opened Jun 02, 2018 by Craig Scott@craig.scottMaintainer

Make compatibility options of write_basic_package_version_file() more intuitive and complete

This is a discussion split out from !2111 (comment 417639) where @drdanz makes the following observations:

... the ExactVersion name is a bit confusing, compared to the other names, especially because the tweak number is never checked, therefore I think that AnyNewerVersion|SameMajorVersion|SameMinorVersion|SamePatchVersion would be easier to understand...

Therefore I'm proposing to add SamePatchVersion instead of modifying ExactVersion, just in case there is someone relying on ExactVersion behaviour (I doubt that, but https://xkcd.com/1172/), and perhaps deprecate and remove ExactVersion later...

Adding SamePatchVersion makes sense given that we already have SameMajorVersion and SameMinorVersion. The fact that ExactVersion is a misleading name for what it does (even though its behavior is accurately documented) suggests that we probably do want to deprecate it and replace it with something that does what ExactVersion should have done and require the entire version string to match (i.e. not even require it to match any particular version numbering format). The option could have a name like IdenticalVersion, although I would welcome a better suggestion than that.

I would also propose that we should have a SemanticVersion compatibility option too (see http://semver.org). I'd argue that this is probably what projects actually want most of the time, but it can't be provided by any of the existing options. SameMajorVersion is close, but it ignores the other version components rather than requiring them to not indicate an older version than the one required. Incrementing the minor version can add new functionality in a backward compatible way, so looking at just the major version alone is not enough. Note that semantic versioning does not include any tweak component.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: cmake/cmake#18060