-
Notifications
You must be signed in to change notification settings - Fork 542
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
Release 2.4.8 #4701
base: release/2.4
Are you sure you want to change the base?
Release 2.4.8 #4701
Conversation
- Add namespace - Enable sanitize builds - Refactor platform unittest external cmake
@@ -272,7 +272,7 @@ configure_file(msquic-config.cmake.in ${CMAKE_BINARY_DIR}/msquic-config.cmake) | |||
install(FILES ${CMAKE_BINARY_DIR}/msquic-config.cmake DESTINATION share/msquic) | |||
|
|||
if(BUILD_SHARED_LIBS) | |||
install(EXPORT msquic DESTINATION share/msquic) | |||
install(EXPORT msquic NAMESPACE msquic:: DESTINATION share/msquic) |
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 happy seeing CMake namespaces being added to exported targets. But it should be clear that this is a breaking change if not complemented by providing an alias with the old name. I wonder if a breaking change is desired in a patch release.
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.
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.
This repo is upstream. That's why I raise the point:
Adding the namespace without add polyfill breaks users.
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.
How do we add the alias? I assume this is only a build time breaking change? Regardless, I would like to prevent those, if possible.
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 namespace is a useful service for consumers, but it doesn't affect the build: It signals to CMake that the identifier is a CMake target, not plain input to the linker. This improves detecting configuration errors.
Alias could be setup in msquic-config.cmake
, after including the generated export files. Sth. like
foreach(_t IN ITEMS msquic msquic_platform ...)
if(TARGET msquic::${_t} AND NOT TARGET ${_t})
add_library(${_t} ALIAS msquic::${_t})
endif()
endforeach()
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.
This could be removed in 2.5 or 3, after proper deprecation.
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.
@dg0yt I thought you are comment on vcpkg.
Can you add alias?
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.
@dg0yt How you can add this to msquic-config.cmake
? this file generate automatic. I will glad for your help.
The suggested change was given almost literally. (I didn't fill in all targets.) msquic/src/bin/msquic-config.cmake.in Line 4 in 21e5b41
Are there any other obstacles? |
This should be done in separate PR to the main. |
@nibanks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/2.4 #4701 +/- ##
===============================================
- Coverage 86.86% 86.82% -0.05%
===============================================
Files 56 56
Lines 17338 17338
===============================================
- Hits 15061 15053 -8
- Misses 2277 2285 +8 ☔ View full report in Codecov by Sentry. |
Better wait to @dg0yt changes in vcpkg: |
@nibanks At the moment, vcpkg port was merge without apply the patch inside. Let me know what do you think. |
IMO one PR shouldn't mix these independent topics:
The PR which adds the test could also add commits with necessary fixes. That's how to get to a good CMake usage pattern. Similar to what was done in vcpkg with vcpkg-ci-msh3. Dealing with export namespace and aliases would follow the integration of the test. |
Probably it is enough to add an alias for |
the commits are cherry picks. As upstream rules, you just bring previous commits from head without change them. If I understood it correctly. I have one commit that bring the namespace and refactor platform unittest external cmake. (There is no adding test, it old text). |
Release 2.4.8
Refactor: