Skip to content
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

Unusual semvar usage #40

Closed
tcharding opened this issue Mar 23, 2022 · 4 comments
Closed

Unusual semvar usage #40

tcharding opened this issue Mar 23, 2022 · 4 comments

Comments

@tcharding
Copy link
Member

Why have we released versions

  • 0.19.0-1
  • 0.19.0-2
  • 0.19.0-3

This is not valid semvar versioning according to the grammar? Shouldn't the versions have been

  • 0.19.0
  • 0.19.1
  • 0.19.2

Note that cargo is handling these versions correctly it seems. I built rust-bitcoin depending on 0.19.0-2 and got 0.19.0-3 in the lock file.

@TheBlueMatt
Copy link
Member

Hmm, but its referring to the bitcoin core version, plus a number. Does cargo allow 0.19.0.1? Otherwise we probably have to stick with the -

@tcharding
Copy link
Member Author

Oh cool, I did not pick that up. Cheers, I did a PR adding docs to the version number.

Also for the record I was wrong, the current version number is valid semvar. The N after the dash is interpreted as . So we are abusing the semvar instead of being invalid, that explains why cargo handles it correctly.

Closing this issue.

@dr-orlovsky
Copy link
Contributor

This is the valid semver, as you write later: https://semver.org/#spec-item-9

I think the best is to use 0.22.0-M.m.p where M, m, p will be for major, minor and patch version of this rust library and 0.22.0 for bitcoin core version.

@tcharding
Copy link
Member Author

Good idea!

tcharding added a commit to tcharding/rust-bitcoinconsensus that referenced this issue Apr 7, 2022
Currently we are vendoring the source code from Bitcoin Core `v0.19`.

Update the submodule to use branch `0.21`, the tip of which is currently
on tag `0.21.2`.

Includes changes to the build script by Jake and update to the C++
toolchain suggested by Richard.

Uses a new format for the version, discussed in GitHub issue rust-bitcoin#40
`M.m.p-M.m.p` where the first major,minor,patch is for Bitcoin Core and
the second one is for this library. Updated the semvar version of this
lib to `4.0.0` because of the changes to the C++ compiler used.

Co-developed-by: Jake Rawsthorne <jake@jakerawsthorne.co.uk>
Co-developed-by: Richard Ulrich <richard.ulrich@seba.swiss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants