-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[util-linux-libuuid] Change CMake target from LibUUID::LibUUID to libuuid::libuuid #18559
Merged
conan-center-bot
merged 2 commits into
conan-io:master
from
samuel-emrys:recipe/18554-util-linux-libuuid-target-is-wrong
Aug 8, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.8) | ||
project(test_package LANGUAGES C) | ||
|
||
find_package(LibUUID REQUIRED CONFIG) | ||
find_package(libuuid REQUIRED CONFIG) | ||
|
||
add_executable(${PROJECT_NAME} test_package.c) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE LibUUID::LibUUID) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE libuuid::libuuid) | ||
target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) |
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.
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.
Where does it come from? Why not just keep
recipename::recipename
? It's conan-center convention when a library doesn't have any official config file or Find module file.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 recipe provides the
libuuid
interface and replaces/deprecates thelibuuid
recipe. The failing libraries for this migration have already been patched forlibuuid::libuuid
, so this is the smallest change that would get everything on CCI functional.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 not because it's the smallest change that it the good one. You can also use set_property() method of CMakeDeps in these recipes to override these names in order to satisfy these patches.
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.
Example if in downstream library there is a custom
Findlibuuid.cmake
and its CMakeLists.txt usesfind_package(libuuid)
andlibuuid::libuuid
target: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 disagree. I put this up to push the issue forward but I'm not particularly invested in an individual solution. I'm not sure your suggestion for
recipename::recipename
is a good one here - we're talking about the target for an interface for which there is no standard. Ideally these three libuuid recipes would be completely substitutable (independently of how advisable that would be).recipename::recipename
doesn't satisfy that. If anything along those lines, I think it should beprovides::provides
. Whether we change what's provided is another question I guess.At the moment the recipe has
provides = "libuuid"
, so I thinklibuuid::libuuid
makes the most sense. I think there's probably also an argument forprovides = "uuid"
anduuid::uuid
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.
For clarity, the three libraries that I see implementing this interface are:
See #17427 (comment) for discussion of each. The original implementation is
uuid
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 like this way of patching/modifying the conan defaults to what individual recipes require - i think it would be good to preference this over patching the build system files where possible. Having said that, given that we're talking about an implementation interface, as above, I think that the
provides
interface should be used instead ofrecipename
, i.e.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 coming around to using
uuid
as theprovides
value. It's the name of the lib that's built by both recipes, which i guess is what we're trying to capture in an interface name:conan-center-index/recipes/util-linux-libuuid/all/conanfile.py
Line 114 in 60fa77f
conan-center-index/recipes/libuuid/all/conanfile.py
Line 88 in 60fa77f
so perhaps the target name should be
uuid::uuid