Skip to content

Use 0.1.0 as default first version in mix new task #4788

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

Merged
merged 1 commit into from
Jun 8, 2016
Merged

Use 0.1.0 as default first version in mix new task #4788

merged 1 commit into from
Jun 8, 2016

Conversation

aquarhead
Copy link
Contributor

Triggered from this tweet: https://twitter.com/HugoGiraudel/status/738694810350014464

This is your friendly reminder that semantic versioning starts at 0.1.0, not 0.0.1. You can’t start with a bug fix.

Also documented in Semantic Versioning's FAQ (http://semver.org/#how-should-i-deal-with-revisions-in-the-0yz-initial-development-phase)

The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.

@whatyouhide
Copy link
Member

I am a bit torn on this. While 0.0.1 may not be a valid release, that may be the intention here: when you create your package from scratch, you usually don't "release" anything. In order to

start your initial development release at 0.1.0

you have to have a release first, or at least this is how I interpreted this.

Quickly looking at tooling in other languages, we have:

  • Bundler uses 0.1.0 when you run bundle gem my_new_gem
  • One example of Node package skeleton uses 0.0.0 (which is an interesting approach 😃, since it doesn't start with a bugfix but with a bogus version right away)
  • Haskell's stack starts with 0.1.0.0, which I'm not sure what it represents but for the scope of this discussion it would seem to be 0.1.0

So, not sure, but we have a bunch more info now :).

@aquarhead
Copy link
Contributor Author

Should have looked at some other project management tools first..

I think the key here is "start", you start on a project, not bugfixing an empty skeleton.

Another thing is when mix new it also fills README.md with instructions of how to use the (to-be-published) library: https://github.com/AquarHEAD/elixir/blob/1cb56b05f982b02a5dc43a6474cd79719cce6a94/lib/mix/lib/mix/tasks/new.ex#L197-L212

I think it will mislead people if not changed.

@josevalim josevalim merged commit 25fee6a into elixir-lang:master Jun 8, 2016
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

@josevalim
Copy link
Member

I think following semver advice is a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants