VersionPrefix and VersionSuffix are misnamed
See original GitHub issueFrom @adamralph on April 7, 2017 6:44
Prefix:
a word, letter, or number placed before another.
The value of this property never prefixes the version. That would imply that the version is another string of characters, and the value of this property precedes it. This never happens.
Until I read the documentation, I was surprised to see values of VersionPrefix
of the form “1.0.0”, since “1.0.0” is not a prefix to the version. It is the version.
The same argument could be applied to VersionSuffix
, depending on the interpretation of “version”. If “1.0.0” is the “version” in “1.0.0-beta1” then it’s true to say that the “version suffix” is “beta1”, but if “1.0.0-beta1” is the “version”, then VersionSuffix
is similarly misnamed.
Update:
Based on the comments below, it seems that the general opinion is that “1.0.0-beta1” is the “version”, implying that VersionSuffix
is also misnamed. I’m re-titling the issue from “VersionPrefix is misnamed” to “VersionPrefix and VersionSuffix are misnamed”.
Copied from original issue: Microsoft/msbuild#1952
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (13 by maintainers)
Top GitHub Comments
We debated this quite a bit in https://github.com/dotnet/sdk/issues/93 and didn’t reach a consensus. I personally favored the single Version property approach as well. Still, we shouldn’t break compatibility with projects that already use the VersionPrefix/VersionSuffix despite their less than perfect names.
The options here seem to be:
Pick better names. To remain compatible, we would have to support old names and new names, which I think would only make the situation even more confusing.
Have only the single Version property. This can’t be done compatibly. In retrospect, I probably should have pushed harder on this before it was too late. However, you are already free to avoid VersionPrefix and VersionSuffix if you dislike them. The examples using only Version should work already.
I’m just not seeing a compelling enough reason to make a breaking change here and I don’t see a non-breaking proposal that adds enough value. I’m closing this because I think the status quo is the least bad option we have.
@nguerrera I hadn’t even noticed that there was a single Version property already. The problem is, I’ve seen people use VersionSuffix alone, redundantly, in place of Version, which illustrates the problem. I.e. if there’s no Version what can VersionSuffix suffix? That scenario should result in an exception being thrown somewhere.
I understand your reluctance to make breaking changes and I can understand the lack of appetite to make any changes to this now. Out of interest, is there any path for deprecation of properties, with or without eventual removal?