New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Pre-Release Dash should not be in v1.0.0 #49
Comments
Hi @theory, I'm not sure I understand the question. In your bulleted list you mention v1.0.0 twice. What specifically are you concerned about? |
v1.0.0 was changed in this commit to require the dash. For a long time before that (years?), v1.0.0 required no dash (indeed, it forbade it). So it changed the spec without changing the version. I wrote a couple of parsers back before that commit and now folks are running into the fact that they forbid the dash even though the spec has since been changed to require the dash. This clouds the definition of v1.0.0, IMO. I think that either 1.0.0 should not require the dash, or v1.1.0 should be released requiring the dash. I prefer the former, but given that the change was made 10 months ago, the latter might make more sense. |
@theory That section only applies to "pre-release" versions. For example, if you want to denote that your version is an alpha release, you must use the dash. Does that make sense? |
Yeah, I understand that. The point is that the dash used to not be required before the prelease version, but that commit added that requirement -- without changing the version of the spec itself. In other words, I wrote parsers against v1.0..0 of the spec, and the spec then changed so that my parsers now fail, even though the spec still claims to be v1.0.0. |
Ah! I see! Well that unfortunately wasn't a stable version of 1.0.0. Unfortunately, it's not very clear by looking at just that file. As you can see in this later commit, the version of SemVer itself was made more clear: b8f12d7 So in summary: in the stable 1.0.0 the dash is required and that's never changed since 1.0.0 has been released. The changes the version spec happened in a pre-release version of SemVer. Sorry for the confusion! |
b8f12d7 Went from v1.0.0 to the lower version v1.0.0-rc~1. You can see that, because of that error, the spec was later changed to v2.0.0 in this commit. It had been published as v1.0.0 for a long time before the semver project was forked from semver.org. |
Maybe @mojombo can shed some light on this. My theory is that while the text of the file says 1.0.0, it wasn't actually 1.0.0. I know that's confusing, but it's not unlike saying that it's the beta draft of the 1.0.0 spec. You don't want to change the text of the spec for each pre-release version update. However, I would have expected something external to the spec would identify what version it actually was. I vaguely remember there being some indicator because when we implemented the version scheme in NuGet, we knew it was an RC at the time and not the final spec. I don't recall how we knew other than I think we asked. |
Thanks! Well that does leave us in a conundrum. 1.0.0 stable has been out for some time now and I imagine even more software has been written that parses that variant of 1.0.0 than the version that disallows the dash. I don't think it makes sense to try and change 1.0.0 at this point as that ship has sailed and only compounds the problem. So are you proposing that 2.0 allow cases without the dash? |
No, I like the dash. I wish I had noticed this ten months ago. I think what makes sense, really, is to revert 1.0.0 to disallow the dash, but release a 1.1.0 that requires it. That way, older parsers can say the adhere to v1.0.0, and those that read the spec in the last ten months can say they adhere to v1.1.0. (Though how we let people know such a thing has happened I'm not sure). |
Yeah, that is tricky. Hmmm, here's what I'm thinking. For the sake of discussion, let's distinguish the initial As I understand it, some software implemented support for If we made the change you suggest so that The alternative is to consider In practice, this is pretty much the same thing as your plan, but with different labels. So other than making this change:
I propose we do this:
That way, all existing parsers can claim I know it's not pretty, but the only pretty solution would be to get a time machine and prevent this from happening. But if I had a time machine, I'd probably go back and give my younger self a sports almanac and forget to handle this. :) What do you think? |
I could get on board with that, especially if the 1.0.0-beta you propose (1.0.0beta?) was published somewhere that older parsers could point at it, at least until they can be updated. |
Cool! I'll confer with @mojombo to figure out exactly how we should handle it. I assume we'd want to point this version to this commit (semver/semver.org@a16c419), right? |
Yeah, that looks right to me. Thanks. |
BTW, thanks @haacked, for getting back to me so promptly and engaging in a productive discussion. Much appreciated. |
No problem! BTW, I'm still planning to do this. I've just been busy with so much other stuff going on. I haven't forgotten! |
In the meantime, I've released new versions of semver PostgreSQL extnesion and the SemVer Perl module to support the hyphen, though they both will parse SemVers without the hyphen. |
Hi @theory I haven't forgotten about this. Just been real busy. BTW, I'm going to close this an open an issue at https://github.com/mojombo/semver.org where this really belongs. Even better would be if you wouldn't mind submitting a PR of how you think the website should be updated. 😄 That'd make it easier to discuss and update the site. |
Opened semver/semver.org#52 so I can close this. |
Man, so confused. Just trying to get things straight:
I was confused as to why the version was decreased in b8f12d7 from v1.0.0 to v1.0.0-rc~1 after the tagged v1.0.0, but 24eda4f makes it clear that was a mistake. So I think all the tags are in the right places. This note is more to spell out where things changed, for my own reference and sanity. |
This change somehow made it into the 1.0.0 spec. That doesn't seem quite right. I should think that this commit would be considered the last in v1.0.0. Am I mistaken? Because otherwise there are three different versions to recognize:
This makes it difficult to write a parer to properly handle all the cases.
The text was updated successfully, but these errors were encountered: