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

ABI stability policy #23

Closed
nwellnhof opened this issue Mar 31, 2015 · 5 comments
Closed

ABI stability policy #23

nwellnhof opened this issue Mar 31, 2015 · 5 comments

Comments

@nwellnhof
Copy link
Contributor

The addition of the options parameter to cmark_markdown_to_html in version 0.18.2 breaks the API and ABI. Since the soname of libcmark is currently based on major and minor version (0.18), this can cause problems. If someone updates the libcmark binary from 0.18.1 to 0.18.2, any code compiled against the old version will call cmark_markdown_to_html without an options argument. There won't be a linker error because the soname matches.

We should make sure to always bump the library's soname if the ABI changes. I can see the following solutions:

  1. Derive soname from major and minor version like we do now. Only allow ABI changes if we release a new minor version.
  2. Derive soname from major, minor and patchlevel. This means to recompile all dependent binaries whenever a new libcmark version is installed, even if it were ABI-compatible.
  3. Manage soname manually. Check if there's an incompatible ABI change when cutting a release. If yes, bump soname.

The second approach puts the least burden on the release manager and, at least for now, shouldn't be too annoying for users.

@jgm
Copy link
Member

jgm commented Mar 31, 2015

Apologies, I hadn't thought about this. Since we're currently pegging major [EDIT: minor] to the spec version, option 1 is a bit constraining. So maybe option 2 is best for now. We can change back when we stabilize the spec and libcmark. Do you want to make this change?

+++ Nick Wellnhofer [Mar 31 15 03:32 ]:

The addition of the options parameter to cmark_markdown_to_html in version 0.18.2 breaks the API and ABI. Since the soname of libcmark is currently based on major and minor version (0.18), this can cause problems. If someone updates the libcmark binary from 0.18.1 to 0.18.2, any code compiled against the old version will call cmark_markdown_to_html without an options argument. There won't be a linker error because the soname matches.

We should make sure to always bump the library's soname if the ABI changes. I can see the following solutions:

  1. Derive soname from major and minor version like we do now. Only allow ABI changes if we release a new minor version.
  2. Derive soname from major, minor and patchlevel. This means to recompile all dependent binaries whenever a new libcmark version is installed, even if it were ABI-compatible.
  3. Manage soname manually. Check if there's an incompatible ABI change when cutting a release. If yes, bump soname.

The second approach puts the least burden on the release manager and, at least for now, shouldn't be too annoying for users.


Reply to this email directly or view it on GitHub:
#23

@nwellnhof
Copy link
Contributor Author

See pull request #25.

@jgm
Copy link
Member

jgm commented Apr 1, 2015

Thanks for the PR (merged). Do you think we should release 0.18.3 now with this change?
Or can it wait?

@nwellnhof
Copy link
Contributor Author

If it isn't too much work, it would be nice to make a new release.

@jgm
Copy link
Member

jgm commented Apr 1, 2015

Will do.

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

2 participants