You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
i'm missing something: why is it ABI incompatible? also this change was made based on package maintainers expecting the SO version to match the major version of the library (as i do).
The reason will be displayed to describe this comment to others. Learn more.
Why would you need setting SOVERSION if it's the same as the major version anyway? If you strictly follow semantic versioning and ensure no ABI breaks, then keeping SOVERSION and major version in sync makes slightly more sense.
Regarding ABI incompatibility, see #1321. Previously, many internal symbols were exposed. This is no longer the case.
Either way, it's news to me that package maintainers get to decide how upstream versions its library. Particularly, it is not clear why someone would expect the SONAME to remain the same between releases. Such an expectation must completely ignore the purpose of an SONAME.
The reason will be displayed to describe this comment to others. Learn more.
the concern in full:
"I built the updated package but noticed some strange soname versions:
/usr/lib/libbenchmark.so.1 and /usr/lib/libbenchmark_main.so.1 are now both at
version 2 (libbenchmark.so.2 and libbenchmark_main.so.2) while the links with
the full version number are still named libbenchmark.so.1.6.1 and
libbenchmark_main.so.1.6.1 instead of libbenchmark.so.1.6.2 and
libbenchmark_main.so.1.6.2"
ie, there's an expectation (which i share) that SO version follows major version. i didn't consider the removal of internal symbols as ABI incompatible precisely because they were previously clearly labeled as internal (non-public) albeit with a sign, not a cop.
i would prefer to maintain a link between major version and SO version, though i must admit that i generally use minor version to indicate some part of the public API has changed (which is not strictly semantically valid.. maybe that should be reconsidered).
The reason will be displayed to describe this comment to others. Learn more.
The concern "strange name" is not valid, neither is the expectation given benchmark does not follow semantic versioning (by your own admission.) Removal of internal symbols exactly results in an ABI incompatibility because users cannot access (all) internal symbols anymore which was previously possible.
Aside from the muddle this changed has caused, there's no technical reason to keep SOVERSION at 1. Therefore, I recommend reverting the change.
The reason will be displayed to describe this comment to others. Learn more.
would it be even more correct to release 1.7 (indicating a more significant change) and set the SOVERSION to 7? then follow the minor version from that point on?
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that would be wrong. However, skipping several SOVERSIONs will only cause more confusion. Generally speaking, every time a backward incompatible change is made, SOVERSION should be incremented. This is sufficient as a versioning strategy.
The alternative is to drop SOVERSION altogether since it does not (currently) convey any meaningful information.
The reason will be displayed to describe this comment to others. Learn more.
That's a false premise. If you provide the attribute, one assumes the information is in fact meaningful. By dropping SOVERSION you explicitly state the version conveys all the information you need. Implied information is clearly subject to interpretation.
d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in #1434 (comment), this change is incorrect due to ABI incompatibility to previous release.
SOVERSION
does not refer to the major version of the library. More info here: https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html.d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm missing something: why is it ABI incompatible? also this change was made based on package maintainers expecting the SO version to match the major version of the library (as i do).
d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you need setting
SOVERSION
if it's the same as the major version anyway? If you strictly follow semantic versioning and ensure no ABI breaks, then keepingSOVERSION
and major version in sync makes slightly more sense.Regarding ABI incompatibility, see #1321. Previously, many internal symbols were exposed. This is no longer the case.
Either way, it's news to me that package maintainers get to decide how upstream versions its library. Particularly, it is not clear why someone would expect the SONAME to remain the same between releases. Such an expectation must completely ignore the purpose of an SONAME.
d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the concern in full:
"I built the updated package but noticed some strange soname versions:
/usr/lib/libbenchmark.so.1 and /usr/lib/libbenchmark_main.so.1 are now both at
version 2 (libbenchmark.so.2 and libbenchmark_main.so.2) while the links with
the full version number are still named libbenchmark.so.1.6.1 and
libbenchmark_main.so.1.6.1 instead of libbenchmark.so.1.6.2 and
libbenchmark_main.so.1.6.2"
ie, there's an expectation (which i share) that SO version follows major version. i didn't consider the removal of internal symbols as ABI incompatible precisely because they were previously clearly labeled as internal (non-public) albeit with a sign, not a cop.
i would prefer to maintain a link between major version and SO version, though i must admit that i generally use minor version to indicate some part of the public API has changed (which is not strictly semantically valid.. maybe that should be reconsidered).
d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concern "strange name" is not valid, neither is the expectation given benchmark does not follow semantic versioning (by your own admission.) Removal of internal symbols exactly results in an ABI incompatibility because users cannot access (all) internal symbols anymore which was previously possible.
Aside from the muddle this changed has caused, there's no technical reason to keep
SOVERSION
at 1. Therefore, I recommend reverting the change.d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be even more correct to release 1.7 (indicating a more significant change) and set the SOVERSION to 7? then follow the minor version from that point on?
d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe that would be wrong. However, skipping several
SOVERSION
s will only cause more confusion. Generally speaking, every time a backward incompatible change is made,SOVERSION
should be incremented. This is sufficient as a versioning strategy.The alternative is to drop
SOVERSION
altogether since it does not (currently) convey any meaningful information.d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you agree that it doesn't convey meaningful information then leaving it as 1 should be sufficient too.
d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a false premise. If you provide the attribute, one assumes the information is in fact meaningful. By dropping
SOVERSION
you explicitly state the version conveys all the information you need. Implied information is clearly subject to interpretation.d4bc509
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a completely fair point.
i'm comfortable dropping it.