Repository navigation
Conversation
Set SOVERSION to PROJECT_VERSION_MAJOR instead of PROJECT_VERSION_MAJOR.PROJECT_VERSION_MINOR so minor SemVer releases do not break shared library SONAME compatibility. Fixes: nodejs#925 Signed-off-by: ychampion <68075205+ychampion@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #925
Currently
CMakeLists.txtsetsSOVERSIONto${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}, which bumps the shared library SONAME on every minor release (e.g.,9.3->9.4->9.5) even though minor versions in SemVer only add backwards-compatible functionality.This aligns
CMakeLists.txtwith CMake'sSOVERSIONconvention by settingSOVERSIONto${PROJECT_VERSION_MAJOR}while keepingVERSIONat${PROJECT_VERSION}:VERSION:${PROJECT_VERSION}(e.g.9.5.0)SOVERSION:${PROJECT_VERSION_MAJOR}(e.g.9, remaining9across9.xminor releases and bumping only on major releases)Verification
npm run build+CMakeLists.txt_RELEASE_substitution) and configured & built bothllhttp_sharedandllhttp_statictargets with CMake + Ninja + GCC:9.5.0->VERSION=9.5.0,SOVERSION=9(previously9.5)9.6.0->VERSION=9.6.0,SOVERSION=9(stable across minor bump)10.0.0->VERSION=10.0.0,SOVERSION=10(increments on major bump)cmake --buildcompiles and links both shared and static libraries cleanlynpm run build-ts,node --import tsx ./test/headers-test.ts, and ESLint (excluding Windows CRLF linebreak-style on untouched files) pass