Make compatibility options of write_basic_package_version_file() more intuitive and complete
ExactVersionname is a bit confusing, compared to the other names, especially because the tweak number is never checked, therefore I think that
AnyNewerVersion|SameMajorVersion|SameMinorVersion|SamePatchVersionwould be easier to understand...
Therefore I'm proposing to add
SamePatchVersioninstead of modifying
ExactVersion, just in case there is someone relying on
ExactVersionbehaviour (I doubt that, but https://xkcd.com/1172/), and perhaps deprecate and remove
SamePatchVersion makes sense given that we already have
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.