-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Should compat ~0.y.z
be the same as =0.y.z
?
#1246
Comments
If you mean
|
The problem is that I need to pay attention to what the major version is to get "no new features" behaviour. I suggest i.e. i want consistent behaviour no matter the major version, but currently i have to use inconsistent syntax for that. I do not want Note that there is no way for |
Obviously in 0.y.z land, only 2 interesting things can happen: y changes or only z changes. But we have 3 pieces of syntax to play with: Currently |
If we interpret
I think that's what you meant, @nickrobinson251, but there may have been a typo since both of the closed/open version ranges you wrote are empty: |
Actually that's exactly what I am disputing 😆 I understand "only bug-fixes" to be a thing that cannot be represented by a version with a lead 0 (in Julia SemVer world). 0.1 goes to 0.2 if a breaking change is included, else it goes to 0.1.1. So 0.1.1 may contain only bug-fixes, or it may contain backwards-compatible new features, meaning there is no way to ensure we only get bug-fixes. |
That's not how Julia itself used SemVer in the pre-1.0 world, e.g. |
Hmmm, interesting! FWIW, in the 0.y.z world, i think breaking versus non-breaking is a more useful distinction than feature versus bug-fix, at least for packages -- perhaps for projects on the scale of Julia itself it's different, or perhaps I am wrong :) |
The reasoning is pretty simple: if your project is mature enough to have non-breaking feature-adding releases, then its API is pretty stable and it's mature enough to have a non-zero major version number. |
I think maybe the issue i'm running into is that adopting a "breaking v non-breaking" distinction is easier / more useful, partly becuase supporting multiple "breaking"-but-not-actually-breaking changes whenever a new feature or default changed is added is annoying for 2 reasons:
Context is an ecosystem of 10s of packages, some of which have are adding many new features, as part of figuring out the right API. |
Currently
~0.y.z
is the same as^0.y.z
, but I think this might not be such useful behaviour, and perhaps for0.y.z
versions it would be more useful to have~0.y.z
be the same as=0.y.z
.This would allow
^
and~
to mean the same no matter the major version:^
means "only allow SemVer compatible versions" i.e. "allow backwards-compatible new features"~
means "only allow bug-fixes" i.e "do not allow new features"This is what they currently mean for versions x.y.z when x > 0
But for versions or 0.y.z, where SemVer doesn't say anything, I believe "Julia SemVer" as encoded in Pkg says 0.1 and 0.2 can contain breaking changes, and 0.1.1 and 0.1.2 can contain new backwards-compatible features, and there is no way to encode "this just has a bug-fix" in 0.y.z versions. E.g. 0.1.1 -> 0.1.2 may contain only a bug-fix, but may contain a new non-breaking feature.
So I think it is more consistent to have
The gain here is that there is consistent syntax
^
for "only non-breaking features", and~
for "no new features" no matter the major version.The text was updated successfully, but these errors were encountered: