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
Hyphen and Tilde #209
base: master
Are you sure you want to change the base?
Hyphen and Tilde #209
Conversation
are only used for prerelease identification
👍 |
This is personal opinion. I'm more positive on using Other than that, I agree with #145 (comment). |
Tilda is a typo. It should be Tilde. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change and should not even be included in 3.x.x if it ever comes to pass. Please close/cancel this PR at your earliest possible convenience.
Why should a pr be closed if it is incompatible with the current major version? |
@FichteFoll, apologies for being so terse. It was getting late I was trying to complete reviews of all the PR's in the queue. Why should this be closed?
On that last point, consider file systems or packaging tools that do allow the hyphen to be used as specified, but do not allow the plus symbol or its escape code +. I know of one tool with ~10K users that uses the tilde in place of the plus symbol when storing versioned collections of build tools in the cloud. All dots are converted to forward slashes making it very simple to iterate over all package names with a given prefix, such as 1.0.0-a (contains .dev, .nightly, etc.) for instance. Users can use the tool to run queries that result in the original SemVer strings being displayed or they can use the cloud service to browse through the storage system. That later use would be more complicated if the standard overloaded any of the field prefixes. |
I basically think that aliases should be left up to tool designers, not built into the spec. |
I recommend asking your package providers to fully support SemVer, rather than tweaking the spec. Things have changed since you posted the PR. Please see the CONTRIBUTING.md file. In order to get a change committed to the spec, you must first convince a majority of the maintainers to implement your proposed changes, as experimental features. Good luck with that! |
Both of these are breaking changes. |
Adding an alternate unused character #145 is not a breaking change |
Yes, it is a breaking change. It will require that any existing uses of the This change in the spec, if implemented, will potentially require that consumers of those implementations change what they're doing. That's what a breaking change is. If implementers want to have a mode or option to support a |
This is not a breaking change in the spec at all. ‘~’ is not used at all currently. If any implementation used it, they did so outside the spec. That is unfortunate, but not our problem. |
The breaking change is making a string that previously wasn't a valid SemVer into one that is.
Let's say that we call it a non-breaking change. Any implementation that claims to implement or be compliant with "SemVer 2.x" will now be lying. This change would require consumers to re-evaluate (and potentially change) what they're doing, that's what a breaking change is. I'm not saying it's a bad idea. Just that it is certainly a SemVer-major change. One approach that would mitigate the downstream changes required would be to add an alternate mode (or perhaps several), with guidance to implementors suggesting what to do when parsing and re-encoding in those modes. However, support of these alternate modes should not be considered a requirement of compliance with SemVer 2.1 (or whatever). There are some instances of this already in the wild. Is there an implementation yet that can (or should) support this type of mode? I'd be happy to add |
Without getting too into the weeds here: from my perspective, at least, the goal of spec changes right now is to clarify things for implementations. If a big implementation has a practical issue dealing with a spec change, that is our problem. (I am not actually sure I agree with isaac that this is a breaking change, but haven't had the time to think through the details, I only want to respond to the comment about implementors.) |
If any implementer of any specification “extends” that spec with custom additions on top of the spec, they are own their own when the specification get updated with a conflict to their extension. It is not ever a concern of the updated spec, but of the people that extended it. By the same count, if I were to create in code a set of extensions to an API I am consuming in a project, and the next version of that API added similar but different additions, is that a breaking change on their API because of what I did? |
I understand this viewpoint. What I am saying is that I disagree with it, in this specific instance. The semver spec is not useful if it does not describe the actual implementations. A theoretical spec that isn't actually used isn't worthwhile. |
After writing specs for SAE and ETSI for years, the thing that stands out most to me, is that you do not concern yourself with implementations, other than a reference. |
Look, bottom line, if we said we're going to start allowing a character that isn't currently allowed in the spec, that's a breaking change. It means that implementations that are 100% strictly compliant with SemVer 2.0 are not compliant with the SemVer spec that has that change. Maybe the change is good! But a change like that is properly SemVer 3.x, not SemVer 2.x. Consider if we decided to allow any unicode characters in prerelease tags, or specify the main tuple with hexadecimal characters so that If an implementation supports extensions to the spec, which are not specified, and a future clarification or update to the specification breaks those extensions, then yes, that's the implementor's problem, not ours. Propose a clarification or extension that makes node-semver's loose mode no longer "valid", and I'll happily put aside that consideration. After all, it's not strictly "valid" anyway. I do think that it would be good to explicitly document some useful extensions (such as using Done in that way, I'd call it a candidate for SemVer 2.1. |
Closing & re-opening to trigger CI |
@isaacs I will concede that to you. So maybe we really need to start a 3.0 dev and put there ideas to it. |
@EddieGarmon I might've talked myself into the mid-way position while trying to talk you out of yours 🤣 I think specifying some "known useful" non-normative extensions to the specification might be really valuable, so at least we can all be on the same page about how exactly to do Honestly, I'm not sure SemVer v3 is even such a great idea. It's so wedded to the interface layers of the module communities using it that even clearly valuable improvements carry a lot of risk and cost to adopt. If we do bite the bullet and go for a v3 spec, it might be wise to only have it expand to handle cases in the wild, such that any valid v2 SemVer is also a valid v3. That'd pretty significantly limit what we could consider (eg, the proposed restrictions on So, what I'm suggesting is something like:
Or something like that. I've been meaning to write up a spec for ranges as well, could get that started at least with a straw proposal for what node-semver and the semver crate implement. There'll be some discussion required to get that into a reasonable shape, I'm sure. That could also be a v2.1 enhancement, since it truly is strictly additive and isn't going to change anything that's in the spec today. |
…-to-plugins _config.yml: Rename deprecated config option "gems" to "plugins"
are only used for prerelease identification.
Closes #145 - introduce tilde as an alternate prerelease marker for *nix support (incremental addition)
Closes #147 - remove hyphen as a valid identifier character (breaking change)