Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 Build metadata identifier by haacked · Pull Request #77 · semver/semver · GitHub
Nothing Special   »   [go: up one dir, main page]

Skip to content

Conversation

haacked
Copy link
Contributor
@haacked haacked commented Mar 13, 2013

Build metadata is a completely optional way to tack on metadata to a version that does not affect the public API or precedence while still be compliant with SemVer. It's similar to a comment.

This allows folks to build on additional meaning or behavior that's meaningful to their custom systems without making any claims about the public version. For example, folks might use it for cache busting, layering custom behavior on top of SemVer, bookkeeping to tie when and
where a build was made, etc.

This PR is related to #61 and supersedes PR #70. You can see the previous discussions over there.

jeffhandley and others added 4 commits March 13, 2013 14:29
Build metadata is a completely optional way to tack on metadata to a
version  that does not affect the public API or precedence while still
be compliant with SemVer. It's not unlike a comment.

This allows folks to build on additional meaning or behavior that's
meaningful to their custom systems without making any claims about the
public version. For example, folks might use it for cache busting,
layering custom behavior on top of SemVer, bookkeeping to tie when and
where a build was made, etc.
Looks like a big change, but all I did was remove Build metadata from
the precedence rules.
The `+` seemed out of character with the rest of the spec. Following the
example of the pre-release section, we just spell out "sign" and provide
examples for those who don't know what a plus sign is. :)
@EddieGarmon
Copy link
Contributor

Nitpicking here, but should the following two sentences be identical?

pre-release:
Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-].

build metadata:
Identifiers MUST be comprised of only ASCII alphanumerics and hyphen [0-9A-Za-z-].

@haacked
Copy link
Contributor Author
haacked commented Mar 14, 2013

@EddieGarmon this is a spec. Nitpicking is expected! Yes, they should be identical. The second one is bad grammar. Thanks for catching it! 👍

Changed "be comprised of only" with the correct "comprise only".
Bonus, it's less verbose.
semver.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing a space between "hyphen" and the regex.

@jeffhandley
Copy link
Contributor

Aside from the missing space, this looks really good. Thanks, @haacked!

Now... do we want to circle back to freeform metadata and add that in too, as part of RC.2, or do we want to add that in RC.3? I haven't heard back from @loudej for his input on which characters should be allowed. I want to say "any printable, non-space ASCII characters," but I'm not sure how to say that in specific terms and I couldn't find any prior art that defines them.

@loudej
Copy link
loudej commented Mar 14, 2013

SemVer defines the meaning of the characters 'a'-'z', 'A'-'Z', '0'-'9', '-', '+', and '.'.

Additional metadata starts with the first occurrence of any undefined character, and runs to the end of the version string. The only operation defined for additional metadata is equality. It must be the last component of a semver string, and must be the final component used in comparison.

At that point - to be honest - if you remove '+' as a defined character, then the presence of additional metadata would make the formal build number field unnecessary. That is to say 1.2.3-pre+45 would parse as {1, 2, 3, "pre", "+45"} and equality operator on the "+45" metadata provides exactly the same functionality as the build number field.

@jeffhandley
Copy link
Contributor

Thanks, @loudej. I do still like the idea of having a character that marks the beginning of the additional metadata, like # for instance. But then it makes sense to say any character after that until the end of the semver string is just considered to be part of that additional metadata.

I feel like we should define a max length for each of these segments though, including the metadata portion, or define an overall max length for the semver string. Maybe 100 characters for the full semver string?

@colin-haber
Copy link

I don't see why a character limit is important; enforcing a max length for the full string seems somewhat contrary to the idea of having completely custom metadata. Maybe a character limit for just the main part and prerelease data, if character limits are necessary for some reason.

@jeffhandley
Copy link
Contributor

For systems storing version numbers as strings in a database, we need to know how big to make the field. We don't want a varchar(max) for version strings.

@Tieske
Copy link
Contributor
Tieske commented Mar 15, 2013

Wouldn't an optional final flag be useful to indicate the entire string is parsable as a SemVer version. Eg. sv space + sv, resulting in 1.2.3-pre+45 sv

@haacked
Copy link
Contributor Author
haacked commented Mar 15, 2013

Thanks for the input. I'm inclined to leave the changes as-is at this point. We could rathole on this forever. Perhaps we can expand the metadata start sequence in a future version of the spec. But for now, unless anyone sees any glaring issues, I'm going to merge this soon.

@jeffhandley
Copy link
Contributor

I agree that we can leave the freeform metadata off. With the build metadata being meaningless, one could easily just use a segment of the build metadata for whatever extra metadata they want. If there are scenarios that justify the new freeform segment, then a new issue can be filed.

Likewise, I'm going to file an issue about the version string length, and we can discuss that there.

@jeffhandley
Copy link
Contributor

String length issue filed as #79

@jasongregori
Copy link

👍

@jeffhandley
Copy link
Contributor

This looks good. Can we merge it in? And then do we call this RTM?

haacked added a commit that referenced this pull request Mar 20, 2013
@haacked haacked merged commit eceeff1 into master Mar 20, 2013
@haacked haacked deleted the build-metadata-identifier branch March 20, 2013 22:00
@haacked
Copy link
Contributor Author
haacked commented Mar 20, 2013

Done!

@haacked
Copy link
Contributor Author
haacked commented Mar 20, 2013

Someone want to send a PR to the github/semver.org repo to update this? I'm kind of busy today. :)

@jeffhandley
Copy link
Contributor

Done: semver/semver.org#58

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

0