Skip to content

Updated to RC2, with new definition for build metadata - #70

Closed
jeffhandley wants to merge 4 commits into
semver:masterfrom
jeffhandley:master
Closed

jeffhandley wants to merge 4 commits into
semver:masterfrom
jeffhandley:master

Conversation

@jeffhandley

Copy link
Copy Markdown
Contributor

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.

Comment thread semver.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okie dokie. :)

@jeffhandley

Copy link
Copy Markdown
Contributor Author

Updated with the reduced changes.

Comment thread semver.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was Louis's idea. Let's ping him. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried yesterday but couldn't get a hold of him. We can block on accepting this pull request until it's defined though.

Comment thread semver.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just send PR #76

@loudej

loudej commented Mar 10, 2013

Copy link
Copy Markdown

Maybe include '.' in the character set, and not bother saying the value is made of '.' delimited identifiers?

@jeffhandley

Copy link
Copy Markdown
Contributor Author

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.

@serialseb

Copy link
Copy Markdown

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.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/70#issuecomment-14736883.

@colin-haber

Copy link
Copy Markdown

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.

@serialseb

Copy link
Copy Markdown

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.

—
Reply to this email directly or view it on GitHubhttps://github.com//pull/70#issuecomment-14741722.

@colin-haber

Copy link
Copy Markdown

Build metadata only defines uniqueness to allow multiple builds of a version to coexist, thus two versions that differ only by build metadata (or lack thereof) MUST be compatible.

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.

@Tieske

Tieske commented Mar 12, 2013

Copy link
Copy Markdown
Contributor

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."

@colin-haber

Copy link
Copy Markdown

@jeffhandley were you going to add that bit about prerelease compatibility? It definitely should be in the spec.

@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

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?

Build metadata MAY be denoted by appending a plus + and an identifier
immediately following the patch or pre-release version. These optional
identifiers MUST be comprised of only ASCII alphanumerics, hyphens, and dots
[0-9A-Za-z-.]. Build metadata SHOULD be ignored when determining version
precedence. Thus two packages with the same version, but different build
metadata are considered to be the same version.

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.

@Tieske

Tieske commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

I'll update #30 irt the pre-release remark. probably better to keep this PR focussed on just build metadata and not mingle them.

@EddieGarmon

Copy link
Copy Markdown
Contributor

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.

@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

Ah, good point. The description should match what we have in pre-release. Multiple dot separated segments of [0-9A-Za-z-].

@jeffhandley

Copy link
Copy Markdown
Contributor Author

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,}.

@Tieske

Tieske commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

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.

@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

@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?

Build metadata MAY be denoted by appending a plus + and a series of dot 
separated identifiers immediately following the patch or pre-release version. 
Identifiers MUST be comprised of only ASCII alphanumerics and hyphen 
[0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version 
precedence. Thus two packages with the same version, but different build 
metadata are considered to be the same version.

Perhaps we could even go so far as point to the prerelease identifiers.

Build metadata MAY be denoted by appending a plus + and a series of dot 
separated identifiers immediately following the patch or pre-release version. 
Build metadata identifiers have the same format as pre-release identifiers. 
Build metadata SHOULD be ignored when determining version 
precedence. Thus two packages with the same version, but different build 
metadata are considered to be the same version.

Notice both of these remove the word optional as that's implied by MAY. What do you think?

@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

I think I lean towards the first one where we simply repeat language from pre-release identifier.

@jeffhandley

Copy link
Copy Markdown
Contributor Author

I like the first one as well.

@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

@jeffhandley Should I just update this branch with this new wording or do you want to do it?

@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

By the way, just as an FYI requiring a minimum of 1 character isn't the same thing. Because that regex would allow:

1.0.0+........

And I don't think we want that. Makes it hard if you put a version at the end of the sentence. 😛

@jeffhandley

Copy link
Copy Markdown
Contributor Author

Have at it, @haacked. Thanks!

@haacked haacked mentioned this pull request Mar 13, 2013
@haacked

haacked commented Mar 13, 2013

Copy link
Copy Markdown
Contributor

Ok, closing this PR in favor of #77. Have a quick look before I merge that in everyone that cares!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants