-
Notifications
You must be signed in to change notification settings - Fork 125
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
Please do NOT bump library versions without functional changes #189
Comments
Following the libtool versioning instructions here: https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
The source code did change, so that's why 29.0.0 bumped to 29.1.0. Are we misinterpreting this policy? |
It's easy to interpret the rule as "if you change the .cpp or .h files, bump the revision, but if you just fix the build scripts, you don't." But an alternate interpretation might be "changes to the source code that would result in a change of the object code." I think you could also say that if it didn't build correctly on a platform, and a source change makes it build, it's not really a "change" since there was no "before." So maybe in this case there was a little wiggle room, because the "source code change" did not change what got compiled on Intel-based platforms, and for M1 Macs it wouldn't build previously at all. So we probably didn't have to bump the number. But this stuff is super subtle. It's pretty excusable to bump the revision on every release unless you are exceptionally sure that it's identical on all platforms on which it previously built at all. |
For the record, this subtlety would not have (and did not) occur to me as we were making this release. I interpreted it as you did, Cary. It's only in retrospect, with this issue highlighted for us, that I can see that there's a level of nuance that I had overlooked. |
Also for the record: this whole thing has made it very clear that I do the library numbering ENTIRELY WRONG on my other projects. On the other hand, nobody has complained in > 10 years, so I'm just not sure how big an emergency it is to drop everything to fix. |
My assumption is that changing the leading "current" number (29) causes churn (which in this case would have been unnecessary), but changing the "revision" number (0) does not, so "29.1.0" should be a drop-in replacement for "29.0.0", but I'd love to better understand the implications. |
I don't think there is an emergency, I was just questioning if a build fix from "build broken" to "starts to compile for macOS" really warranted a revision bump. I think the assumption around "just major number relevant for ABI" is correct and 29.1.x should be drop-in compatible with 29.0.y. I also wonder if libtool's versioning in its own libtool world maps out portably to other worlds including the cmake build world... the run-time linker of the OS is not libtool... |
A related question we raised but didn't resolve: What's the proper setting of the version and soversion on the master branch? Building off of master produces something that is typically not equivalent to an official release version. We concluded the proper strategy is for the master branch to look forward and specify the next minor version/soversion. I'd welcome any guidance about how other projects typically handle this. |
@mandree, could you elaborate? For somebody who's been at this for so very long, I'm embarrassed by my continued confusion about which rules are OS, which are linker, which are libtool conventions (aside: I don't even know for sure if the cmake build system uses libtool underneath), which are GNU organization preferences for their own projects (some of their programming conventions I agree with, others are not to my taste at all), what is really required, and what is considered best and/or common practices for managing library versions. |
@lgritz I am exactly in the same boat. I think we should have an issue whose title is exactly your statement!!! Edit: @mandree, I see your thumbs down emoji there :) To be clear, what I'm trying to express is that it seems we can't yet articulate on behalf of the project what the correct policy is, and so I think we need to discuss and document it. To my mind, that would be the proper resolution of this issue. |
If a change only affect building, then those affected by the fix can always pull the specific changeset and apply it on their build to build successfully, without bumping the version. |
I propose that we rename this issue to "Establish library version change policy". @mandree Your original request is well taken, and this issue is changing into a centralized working discussion to investigate and establish what the policy should be. Does anyone have any objection to renaming the issue? |
Renaming is fine for me. I have been looking for documents in the meanwhile, but most I could find is GNU-libtool-centric which is adding an additional policy layer and that I do not want to endorse because libtool brings its own can of worms and is not used with cmake. All the other things essentially boil down to looking at the major version as part of the SONAME of the provided library (Imath, or openexr) and it landing in the NEEDED tags of the libraries and executables that link against it. |
I just ran into this with the 3.1.8 release, even if nothing API/ABI changed from 3.1.7, I still have to announce the rebuilds ahead of time on the Fedora development mailing list and then rebuild all the following packages:
|
Oh no, we messed this up again, didn't we? Perhaps we should un-release and try again with the right so numbering? This mistaken change is too disruptive. |
Asides for @hobbes1069:
|
This was my mistake, my apologies. We'll discuss this again internally and come up with a better process. I admit I'm unclear on the precise versioning procedure for a library that is predominantly inline/templates. The headers did change, although I believe not in ways that make a functional difference. |
You don't necessarily need to follow this guide, but some kind of ABI comparison for ABI compatibility may be good. https://sourceware.org/libabigail/manual/abipkgdiff.html I run a wrapper, fedabipkgdiff, which allows me to compare against existing RPMs to help determine if there has been an API/ABI change when I'm evaluating updating a library package. Perhaps there's a way to incorporate it (or something like it) into the CI infrastructure? |
@cary-ilm I think the only mistake was in the very last commit that staged the release for 3.1.8, which included this change in CMakeLists.txt: -set(IMATH_LIBTOOL_CURRENT 30) That first number should just never be bumped for a patch release, in which by definition and policy we never intend to create a backwards compatibility break. That is, we all agree that 3.1.8 should just be swappable in for 3.1.7. I'm sure it was just a mistake on your part, and then the rest of us missed it when reviewing the code. I don't think we currently have a "RELEASING" document that gives the procedures and checklist for how we release. We should make one and then just add to the checklist that we should ensure we haven't bumped the wrong numbers for patch releases. I can't deploy 3.1.8 at my facility for basically the same reason -- it will break all the execution environments that assume 3.1.x+1 can be substituted for 3.1.x without rebuilding things, but I fear that the dynamic liker will reject the new name. I really need this new release for the DWA fix in the core library, so I'm in a bind. I think we should re-release 3.1.8 (or else bump to 3.1.9 with a fixed library version, and deprecate 3.1.8 with prejudice, it will only break things). |
I can make a 3.1.9 that corrects the so number, but it looks like the previous release is similarly broken, so presumably the situation we're in now shouldn't be all that different from where we've been since v3.1.7 in May. The .so versions for the last few releases:
In retrospect, my mistake was inadvertently applying the rule that says "If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0" to the API rather than the ABI. 3.1.7 did introduce a new method, @kdt3rd contributed an ABI checker script to OpenEXR based on https://github.com/lvc, although
Imath v3.1.7 should have been I'm not entirely sure the best fix from here, but I propose releasing a v3.1.9 with the so version |
Oh boy. Well, for my part, slothy Larry hasn't upgraded internally at Imageworks since 3.1.5, so my vote would be to have 3.1.9 go back to .so.29.x series and declare both 3.1.7 and 3.1.8 to be mistakes that we wish into the cornfield. But I don't know if Richard (if he can even still read this thread with his eyes bleeding) will have a different opinion on the least disruptive way forward. |
It would be good to get input from other distro package maintainers, but as Fedora is on 29.5, 29.8 wouldn't be disruptive.
|
FreeBSD has packaged the patchlevel releases, so we need to clean up anyways, which I will do. It would be beneficial to have clean-up Imath and OpenEXR releases in the same vein in the first half of June so we can properly clean up fallout before we branch our quarterly aka stable 2023Q3 packaging branch July 1st. (We maintain a latest and a no-surprises three-monthly branch for third-party packages.) Other than that, @cary-ilm 's most recent comment and the with-hindsight policies would be much appreciated as future direction. Takeaway, do not bump without ABI change. It is the point I have apparently explained in a way so that it took some time to be understood. Thanks, Cary, for spelling my idea out in other words. (FreeBSD rebuilds direct dependencies on incompatible changes by way of what we call PORTREVISION bumps on packages consuming a changed requisite. It is a FreeBSD version add-on on top of the upstream version counter, the latter we consider the DISTVERSION). |
Not really a mistake there - what you seem to have omitted was the mandatory execution of all the steps instead of stopping where you think you hit your condition:
That way (step 5 is also true in addition to your step 4, but not 6), the ABI version/SOVERSION (which libtool calculates as
See also e.g. https://github.com/pvanhoof/dir-examples and https://dcreager.net/shared-library-versions/#cmake The real problem is that the Imath versioning policy outlined here does not match nor does it implement libtool's really but seems to be some weird cross w/ semver that is evidently not working out: Lines 27 to 45 in e95e049
For other ideas see e.g. libtiff (replicates libtool versioning exactly), libavif (does its own policy, but correctly), libjxl (semver policy)... So, you either need to implement all the libtool mechanisms correctly, or go with your own policy but then not let the libtool one confuse you. 😉 |
This reverts commit 4a06379. Bugs: AcademySoftwareFoundation/Imath#189 Bugs: https://bugs.gentoo.org/907211 Signed-off-by: Bernd Waibel <[email protected]>
Mask dev-libs/imath-3.1.7 due to upstream soversion issue. Bug: AcademySoftwareFoundation/Imath#189 (comment) Signed-off-by: Bernd Waibel <[email protected]>
This reverts commit 4a06379. Bug: AcademySoftwareFoundation/Imath#189 Bug: https://bugs.gentoo.org/907211 Signed-off-by: Bernd Waibel <[email protected]>
Mask dev-libs/imath-3.1.7 due to upstream soversion issue. Bug: AcademySoftwareFoundation/Imath#189 (comment) Signed-off-by: Bernd Waibel <[email protected]>
This reverts commit 4a06379. Bug: AcademySoftwareFoundation/Imath#189 Bug: https://bugs.gentoo.org/907211 Signed-off-by: Bernd Waibel <[email protected]>
Mask dev-libs/imath-3.1.7 due to upstream soversion issue. Bug: AcademySoftwareFoundation/Imath#189 (comment) Signed-off-by: Bernd Waibel <[email protected]>
Note this reverts the .so file major version from 31 to 29, but after some discussion, the AcademySoftwareFoundation people seem to have revised the versioning policies and also did not intentionally make breaking changes. <AcademySoftwareFoundation/Imath#189> It looks as though future releases should be less painful WRT versioning. Unfortunately that means we need to bump PORTREVISION and rebuild ports again, and it's getting messy with respect to 2023Q2, which has 3.1.7 and major version 30... Changelog: https://github.com/AcademySoftwareFoundation/Imath/blob/v3.1.9/CHANGES.md#version-319-May-31-2023
Greetings,
if there is only a patchlevel change, for instance between v3.1.0 and v3.1.1, that fixes a BUILD issue that causes either "no package" or "package built" - please DO NOT BUMP library versions. This causes needless churn in package repositories and is abusing the library versioning. There is nothing that warranted bumping from .so.29.0.0 to .so.29.1.0 between v3.1.0 and v3.1.1.
The text was updated successfully, but these errors were encountered: