|
|
Log in / Subscribe / Register

automated testing

automated testing

Posted Jun 17, 2012 0:22 UTC (Sun) by cmccabe (guest, #60281)
In reply to: automated testing by nix
Parent article: Calling for a new openSUSE development model

> More to the point, you need not just shared library versioning but
> pervasive use of versioned symbols and no ABI breaks for this. This is so
> far from being true that it is almost laughable: hardly any upstreams
> bother with versioned symbols in any real sense (using them to avoid ABI
> breaks), and when distros try to version their own libraries' symbols
> despite upstream not doing so, it causes compatibility problems with
> upstream and half the time they have to remove the versioning again.

You don't need versioned symbols. You just need to be sane about not breaking backward compatibility. So if you have a struct foo that you exposed to the world in version 1.0, in the new version you create a struct foo2 that has your new stuff in it. Or better yet, don't expose foo to the world-- expose an opaque pointer and accessor functions instead. If worst comes to worst, you can bump up the major API number and allow the old and the new version to be installed simultaneously. A lot of libraries have gone down this path, and it's not that bad.

Of course, versioned symbols are available for those who really, really want them. But each platform has its own subtly different implementation, and it's really difficult to actually get it right. As usual, simple is better.

Binary compatibility is do-able in C++ too. See http://techbase.kde.org/Policies/Binary_Compatibility_Iss...


to post comments

automated testing

Posted Jun 17, 2012 13:22 UTC (Sun) by nix (subscriber, #2304) [Link]

You don't need versioned symbols. You just need to be sane about not breaking backward compatibility.
Yeah, but if you want real backward compatibility, which includes not breaking people merely because you did need to change an API, then you need versioned symbols.

But most people these days don't seem to give a damn about ABI or API compatibility. Wild change and close coupling is the order of the day. Hallelujah :((

(Hm, when did I become a grumpy old man?)

(As for the C++ binary compatibility constraints: they're horrendous, and I remain amazed that KDE can stick to them.)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds