Repository navigation
Updated to RC2, with new definition for build metadata - #70
jeffhandley wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Thanks Jeff! Not sure we need to change the wording of parts that aren't changing. If you want to change the wording of these existing sections, do that in a separate PR. This PR should only focus on the build metadata changes.
|
Updated with the reduced changes. |
There was a problem hiding this comment.
Maybe change the sentence starting with While to:
Identifiers MUST be comprised of only ASCII alphanumerics and hyphens
[0-9AsZa-z\-]. Build metadata does not affect the version of the public API. It
is primarily used to uniquely identify a specific build of a package. Thus
Semantic Versioning specification intentionally ...
There was a problem hiding this comment.
Also, didn't we discuss allowing any non-valid character start a build metadata section? @loudej? Did we back away from that? I think Louis was the one who brought that up.
There was a problem hiding this comment.
Yes, we did. I excluded that (and commented on it before) because I didn't know what character set to allow within the free-form metadata. I feel like we should restrict it to printable, non-whitespace ASCII characters, but I wasn't sure how to correctly define that.
Ideas on how to define the characters allowed?
There was a problem hiding this comment.
It was Louis's idea. Let's ping him. :)
There was a problem hiding this comment.
I tried yesterday but couldn't get a hold of him. We can block on accepting this pull request until it's defined though.
There was a problem hiding this comment.
shouldn't this explicitly state that from an SV perspective; version with the same major/minor/patch levels, with different or no buildmetadata are considered equal/compatible.
And additionally; any version containing prerelease tags is in an unstable state, and hence not compatible/equal with any other version except itself.
There was a problem hiding this comment.
@Tieske I like that. It's defines the version in terms of what it means not what it doesn't mean. Want to take a crack at the wording?
There was a problem hiding this comment.
Yeah, that's a good point. They are "equal" in terms of compatible, but they are "unequal" in terms of caching. I'll try to account for this.
|
Maybe include '.' in the character set, and not bother saying the value is made of '.' delimited identifiers? |
|
Updated to state that versions differing only by build metadata (or lack thereof) must be compatible. Also added the dot to the character set allowed in build metadata and removed the dot-separated identifiers portion. |
|
Aren't compatibility rules already established by the version identifiers? If that's the case then I think that's just redundant. Sent from my iPhone On 11 Mar 2013, at 18:49, "Jeff Handley" <[email protected]mailto:[email protected]> wrote: Updated to state that versions differing only by build metadata (or lack thereof) must be compatible. Also added the dot to the character set allowed in build metadata and removed the dot-separated identifiers portion. — |
|
I think that redundancy is important, though. It makes the place of build metadata very clear. With something as precise as this, it's probably better to be redundant rather than confusing — every other part of the version affects compatibility somehow, it should be made clear that is the exception. |
|
Be redundant with non normative examples. Normative texts on standards ought to introduce as little redundancy as possible, for the simple matter that it introduces verbiage and more points of potential confusion. Seb On 11 Mar 2013, at 20:06, "Colin Haber" <[email protected]mailto:[email protected]> wrote: I think that redundancy is important, though. It makes the place of build metadata very clear. With something as precise as this, it's probably better to be redundant rather than confusing — every other part of the SemVer spec affects compatibility somehow, it should be made clear that is the exception. — |
That line, assuming it's the one you have a problem with, seems like it only helps to make things clear. It tells implementors the minimum standards for handling build meta. And I'd disagree with saying that keeping this in the spec creates points of potential confusion — it seems to be the exact opposite. Also, the more I look at the spec, the less redundant this seems. If we're giving build meta special exemptions compared to the rest of the spec, that should be explicit, not implicit. On the other hand, I have no experience writing specs, so you could be completely right. Just my two cents. |
|
seems we doubled, see #76. imo the above redundancy (which it is) is helpful in making the spec as clear as possible, so it should stay. What I'm still missing is the remark regarding pre-release tags; "any version containing prerelease tags is in an unstable state, and hence not compatible/equal with any other version except itself." |
|
@jeffhandley were you going to add that bit about prerelease compatibility? It definitely should be in the spec. |
|
Sorry for all the back and forth, but after looking at the document as a whole (and not focusing in on this change) I do see @serialseb's point. Every point in the document is fairly short and sweet. Then comes this wall of text for the build metadata, which is arguably the LEAST important part of a version and this spec. I don't want to take @mojombo's beautiful spec and trash it with wordiness. So what if we keep the metadata point short and simple with less prescriptiveness? Then we should add a section in the FAQ that provides more details on how build metadata should be used. I think that's the appropriate place to describe the uniqueness benefits of the build metadata. |
|
I'll update #30 irt the pre-release remark. probably better to keep this PR focussed on just build metadata and not mingle them. |
|
The current metadata regex definition [0-9A-Za-z-.] allows for empty segments, i.e. start with a dot, double dot, or end with a dot, and you do not specify how to sort those. |
|
Ah, good point. The description should match what we have in pre-release. Multiple dot separated segments of [0-9A-Za-z-]. |
|
I like the short and sweet description. I too was worried about how lengthy this unimportant segment's definition was getting. What you have sounds good, @haacked. I don't think we need to resurrect the dot-separated segments, but we can state that there's a minimum of 1 character. [0-9A-Za-z-.]{1,}. |
isn't that the same? except this requires people to understand regex, where @haacked suggestion is plain English. |
|
@jeffhandley thanks! I think we should resurrect the dot separated segments. We've already set a precedence with the pre-release. Why would we redefine what an IDENTIFIER is? Perhaps we could even go so far as point to the prerelease identifiers. Notice both of these remove the word |
|
I think I lean towards the first one where we simply repeat language from pre-release identifier. |
|
I like the first one as well. |
|
@jeffhandley Should I just update this branch with this new wording or do you want to do it? |
|
By the way, just as an FYI requiring a minimum of 1 character isn't the same thing. Because that regex would allow:
And I don't think we want that. Makes it hard if you put a version at the end of the sentence. 😛 |
|
Have at it, @haacked. Thanks! |
|
Ok, closing this PR in favor of #77. Have a quick look before I merge that in everyone that cares! |
Related to #61.
I omitted the free-form metadata component, as I wasn't sure what character set to allow within it, but I wanted to proceed with the new build metadata definition.