cmake should check for VERSION_CURRENT file after attempting to compute version

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Build
    • Not Needed
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      When computing the build version (i.e. no BUILD_VERSION was specified in cmake command), cmake first checks for a VERSION_CURRENT file, and if one does not exist, then computes the version from git metadata with calc_release_version.py.

      This could be problematic for users building from source. E.g. if they build from source and generate a VERSION_CURRENT file, future builds won't regenerate VERSION_CURRENT.

      Perhaps the logic should be:

      • attempt to compute the version with calc_release_version.py first
        • if it is greater than VERSION_CURRENT, overwrite it
        • if it is equal, do nothing
        • if it is less, return an error
      • if calc_release_version.py fails to run (e.g. python/git are not installed) then fall back to VERSION_CURRENT

      For a real life scenario where this almost happened, homebrew caches the repository files of installed packages. If installing from --HEAD, the VERSION_CURRENT file would be generated on first install, but not regenerated on upgrades. (But currently this is not an issue, because passing BUILD_VERSION was the proposed solution in CDRIVER-3410).

            Assignee:
            Unassigned
            Reporter:
            Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: