hooks icon indicating copy to clipboard operation
hooks copied to clipboard

[conan-center] KB-H040 recommendation is outdated

Open SSE4 opened this issue 3 years ago • 4 comments

from https://github.com/conan-io/conan-center-index/pull/9409

[HOOK - conan-center.py] pre_export(): ERROR: [NO TARGET NAME (KB-H040)] CCI uses the name of the package for cmake generator. Use 'cpp_info.names' instead. (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H040) 

the recommendation to use cpp_info.names looks a bit outdated, I believe, going forward, set_properties should be recommended

SSE4 avatar Feb 21 '22 04:02 SSE4

Related to https://github.com/conan-io/docs/pull/2429

Indeed it will be deprecated at Conan 2.0, but is still relevant don't?

We could add more information about set_property, but cpp_info.names is still used.

uilianries avatar Mar 03 '22 17:03 uilianries

I want to think about something more audacious: A hook which check not only set_properties, but Conan V2: https://docs.conan.io/en/latest/conan_v2.html

The advantage is that we no longer need to create more and more hooks, we can englobe all checks in a single hook. A migration hook, not ConanV2 hook.

In the future, we can create new hooks related to Conan 2.0 when it become the default version.

uilianries avatar Mar 03 '22 18:03 uilianries

I suppose it should be a part of https://github.com/conan-io/conan/issues/10607

SSE4 avatar Mar 04 '22 11:03 SSE4

That's it! A linter would be perfect.

uilianries avatar Mar 07 '22 13:03 uilianries