-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Allow major version to be zero #1507
Comments
version numbers are for machines, not people. They are a contract between a library and its dependents. I'd strongly recommend to start at version 1.0.0, just like npm does when you use You can create pre-releases as you suggest ( I don't see a need for yet another flag. |
Thanks for your recommendation. I however would like to follow semantic-versioning recommendation. This tool is named "semantic-release" wouldn't it be nice if it supported semantic versioning? At least maybe it could be documented that semantic versioning is not fully supported and why. That would have saved me hours of looking in the doc for the feature. |
The meaning of I agree could document that fact somewhere, if we haven't yet. I'm sorry you spent so much time because of this :( |
there is an FAQ about this in the documentation: https://semantic-release.gitbook.io/semantic-release/support/faq#can-i-set-the-initial-release-version-of-my-package-to-0-0-1 |
Thanks @travi for pointing the FAQ! |
sure thing. i think the reasons linked from there are helpful and align with what @gr2m mentions above. i had similar hesitations early on, but have come around to agree. especially since semantic-release supports pre-releases so well now, i think that is the best recommendation. |
I am not sure yet. For instance this is is not a breaking change: So without the major version |
my recommendation is to limit the amount of time that you use a pre-release and try to get to v1.0.0 as early as you can as @gr2m highlighted, semver is for machines. it communicates things like breaking changes. its ok to publish v1.0.0 once the package has a minimum functional use case and publish v2.0.0 as soon as the api breaks. if you follow semver properly targeting machines, you will have far more major versions than when trying to hold things back and tie major versions to marketing type releases. if you are still concerned about stability, use pre-releases some more after you've promoted v1.0.0 to no longer be pre-release so that you then have multiple channels ( |
I completely agree. But I am especially afraid that after publishing Reciprocally as soon as the version Probably all the disagreement come from the fact that you think version numbers are for machines, where I am convinced that they are important to communicate to humans as well (otherwise why would we need prereleases for?). I always consider the version number of a library before adopting it. I will make sure I am ready to migrate a lot of code before adopting a library published as You talk about marketing releases. But I think realeasing as Nevertheless, thank you guys for the feedback. I admit, I didn't expect that answer, and it gave matter to think about. |
@gr2m, @travi, Since that FAQ states "it's not considered a good practice", could it provide sources about that? Right now, the links provided by the FAQ are:
Unless other sources are provided, I don't see a reason to favor a random blog post over an official specification. Could you maybe provide more sources of your statement? Or maybe reword the FAQ answer, so that we understand that it is an opinionated point of view that And of course, don't forget to remove the link to the semantic versioning specification in that FAQ. Since it says the opposite, it only adds to the confusion ;-) |
Same here! Just stumbled upon this issue when looking for a solution to publish 0.x versions. I agree with the points @jcornaz made. And I want to specifically add that being so opinionated about the versioning in this case seems not to be a good choice for a tool, the user should be able to have the final word here. Whether it's the more philosophical question whether versions are for machines or humans (I think it's both) or the concrete case of supporting 0.x releases (which are so widely used in the eco system, and again part of SemVer specs). Btw, with previous
Not sure I will be able to use it with the current limitations... |
I'd also be interested in staying in the Currently investigating if a fork pinning the version below |
I reopen this issue, since there is obviously an action that must be done. Option 1:Add support for Option 2:Update the documentation. The current FAQ entry is confusing, because it points to the semantic versioning specification for more details. But it turns out that the semantic versioning spec does recommend to start initial development at If you really do not want to support |
We talked once more about the topic, but our conclusion remains that this is much more complicated than it looks. Adding this feature will likely create lots of more issues, and we are having a hard time supporting semantic-release as is today. Sorry :( We will not be implementing it in semantic-release. And we have an alternative solution that is supported today: using pre-release channels, see https://semantic-release.gitbook.io/semantic-release/support/faq#can-i-set-the-initial-release-version-of-my-package-to-0-0-1 |
Ok. Thanks for the update. I'm of course sad to see that outcome. Nevertheless can you clarify the documentation please? As I was saying:
|
@gr2m, @travi, just so that you know, using pre-releases is not always an option. For rust projects it is established and documented convention (by the rust team) that a rust crate with unstable public dependencies should have a major version number 0. And since so many libraries have a major version 0 in the rust ecosystem, |
@jaketrent There is work around, but it requires first publishing at 0.x using npm and then adding in semantic-release. We have done it internally at work, but its a little hectic to get setup the first time |
As far as I am aware, that will not work. When releasing a feature, semantic-release will bump from |
I'd be much happier with this tool and find it more intuitive to use if it just supported At work we use this tool for everything, and as a result no service or library that our developers create is ready/usable at |
Release Please by Google supports this use case so it could be used as an alternative |
semantic-release action doesn't allow major version 0 (semantic-release/semantic-release#1507)
semantic-release action doesn't allow major version 0 (semantic-release/semantic-release#1507)
what a bullshit decision. the prerelease feature understand absolutely nobody on the world. if this is your workaround than document it proper. and why do you believe you can decide how I want to release my stuff for internal use??? how the hell should this work? {
"branches": [
"main",
{
"name": "feat/*",
"prerelease": true,
"channel": "beta"
}
]
} |
As well as |
What do you mean "not clearly defined/understood"? It's perfectly defined here: https://semver.org/#spec-item-4 "Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable." |
Hey @benkeil I agree with you, this is just mind-blowing that the tool that at first eye sight is the prime promoter of semantic versioning does such a weird twist. The worst is that I've already invested some of my time into integrating it into my workflow 😞 I am working on an app that has backend (python) and frontend (js/react), in both I want to use semantic releases. Both are initial devs and now, due this tiny detail, my frontend is 1.x.y and backend is 0.z.w... This - honestly - makes me anxious! @benkeil have you found other semantic release tools for react/js that deal with this in a proper way? thx |
Please be kind. It's okay to be upset, but this is not how we communicate. We are firm on our decision. We thought more about versioning than probably most of you. It's much easier to get over applying some deeper meaning to version numbers than a contract of compatibility. There is nothing magical about a 1.0.0. If the APIs are still unstable then you release breaking versions until they are. If you consider your APIs stable at 7.0.0 then so be it, it doesn't matter, it's nothing but a number. |
New feature motivation
Semantic-versioning allow to communicate that a software is in its initial development phase by having the major version of 0. Example:
0.3.1
This is very useful in order to start shipping very early a new software/library and gather as much feedback as possible as early as possible. Yet we don't want to miss-inform users. They must know from the version number that the software is in its initial development phase and that anything can change at any time.
See: https://semver.org/#spec-item-4
New feature description
When configuring the branch, asides the
prerealease: Boolean
option, there could be ainitialRelease: Boolean
(name can be improved)In case you wonder, no
prerelease
andinitialrelease
are not mutualy exclusive:0.1.0-beta.1
0.1.0
1.0.0-beta.1
1.0.0
The text was updated successfully, but these errors were encountered: