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

Introduce symbol to get version of library #914

Closed

Conversation

rickmark
Copy link

This adds additional logic to autoconf for future support of versioning.

I picked 0.8 fairly arbitrarily to represent unstable, 0.9 would be the API stabilization series working to a 1.0

Also a NULL terminated C-String is exported with the symbol secp256k1_version that matches.

@@ -1,5 +1,13 @@
AC_PREREQ([2.60])
AC_INIT([libsecp256k1],[0.1])
AC_PREREQ([2.69])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was to do what bitcoin core was doing for version and release management, I think I can improve it though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we shouldn't increase it to 2.69 without a good reason. I'm not sure if it really works with 2.60 but it's not a disaster if it fails.

AC_PREREQ([2.69])

define(_LIBSECP256K1_VERSION_MAJOR, 0)
define(_LIBSECP256K1_VERSION_MINOR, 8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 99 according to the preliminary plan (#856). I didn't have a particular reason for this besides matching Bitcoin Core's approach. But if I understand this PR correctly , secp256k1_version doesn't include _LIBSECP256K1_VERSION_IS_RELEASE. If minor version was 99 for non-releases, secp256k1_version can be used to distinguish between releases and non-releases.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - I picked 0.8 to provide additional headroom for breaking API changes before stabilization.

0.8 could be cut as a branch now-ish

0.9 would represent a nearly complete API and allow for stabilization from 0.9 -> 0.9.9

and 1.0 would reflect final API / ABI

@real-or-random
Copy link
Contributor

Closing due to no activity. It can always be reopened.

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

Successfully merging this pull request may close these issues.

3 participants