-
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
json-schema-validator: restore correct CMake target name in CMakeDeps #14194
json-schema-validator: restore correct CMake target name in CMakeDeps #14194
Conversation
Hooks produced the following warnings for commit 3943d34json-schema-validator/2.0.0
json-schema-validator/2.1.0
|
I don't quite understand... I have a project which has always used the target Ah, did the cmake_find_package generator produce the It may be the case that this alias was not aligned with the upstream CMakeLists.txt, and the downstream project is therefore at fault relying on a conan target that didn't exist in the upstream, but its absence is unfortunately still a breaking change. The downstream project is like:
|
It's not a breaking change because CMakeDeps has always produced non-namespaced target for json-schema-validator until your PR (which was a breaking change). Non-namespaced target is the official upstream target, namespaced target was a side effect of cmake_find_package behavior. Purpose of |
For sure we need the non-namespaced target back, but this is a breaking change removing the namespaced target. In that a downstream project that previously used this Conan recipe will no longer work. For many libraries, many projects will never have used upstream packages, only conan packages. It may be that the CCI answer for those projects that (without realising, and why would they?) relied on the side effect of the cmake_find_package generator is that it's their problem, but that's unfortunate. |
It doesn't break anything for a given generator. Folks using CMakeDeps were already relying on non-namespaced target, and if it doesn't work for you anymore it's because you have switched from cmake_find_package to CMakeDeps, so a good opportunity to fix your CMakeLists. I don't like the idea to provide alias targets in CMakeDeps just because we would have to support unwanted targets which were generated by cmake_find_package in conan v1. @uilianries @danimtb @prince-chrismc what are your thoughts? |
OK, makes sense. Thanks very much for the explanation. |
@prince-chrismc this line is irrelevant. The only relevant CMake instructions allowing to know whether an imported target is namespaced or not is:
|
@SpaceIm can you please becareful with your choice of words when answer? Instead of what you wrote you could have said "Hey Chris, I think you might have linked the wrong line. The install function that sets the namespace is actually... and you can see it here" This would provide a far superior experience to contributors by politely correcting them :) Hopefully you can apply this advice when interacting with others! |
handle this regression: #13959 (comment)