Closed remicollet closed 3 years ago
API hasn't changed, therefore 8.3.0 should be still ok imho IP2Location_lib_version_string should return 8.3.1
In this case, I have bumped up the version to 8.3.1.
I don't understand that change!
There is not any line changed in API code of the library...why is then the API version increased?
My understanding from a developer's point of view using that library "optional" by dynamic link loading and potentially support several minor or even major versions by checking the API version number:
Optimizations, cosmetic fixes, code changes not affecting any existing API library-version++ api-version: equal
Adding new APIs without breaking exisiting APIs: library-version++ api-version++
Breaking existing APIs: library-version++ api-version++ soname++
has someone a different understanding?
Probably this macro is badly named, as it is the library version, I don't see how it is related to API. So IMHO, it have to match the library version.
The API version is more described by the soname (which should have be bump to 3.1 as new symbols were added in 8.3.0, so -version-info 4:0:1
, but not critical, and too late)
afair I've requested introducting lib-version in the past decoupled from API version to get indication about in case the API was stable while the library version was updated (similar to GeoIPv1 library afair. This were the times before soname was introduced...
So you recommend?
Optimizations, cosmetic fixes, code changes not affecting any existing API library-version++ / api-version: ++
Adding new APIs (or symbols) without breaking exisiting APIs: library-version++ / api-version++ soname.minor++
Breaking existing APIs (or symbols): library-version++ / api-version++ soname.major++
Optimizations, cosmetic fixes, code changes not affecting any existing API
API_VERSION_RELEASE++
Adding new APIs (or symbols) without breaking exisiting APIs:
API_VERSION_MINOR++ soname.minor++
Breaking existing APIs (or symbols):
API_VERSION_MAJOR++ soname.major++
With API_VERSION = library version
Notice: it may be needed to check library patch number in code, even for minor changes not affecting API
Example: https://github.com/php/php-src/blob/PHP-7.4/ext/zip/php_zip.c#L1038 (ok, libzip 1.3.1 have introduced a bad free issue... which was quickly fixed in 1.3.2)
https://github.com/chrislim2888/IP2Location-C-Library/blob/master/libIP2Location/IP2Location.h#L57