Skip to content
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

[conan-center] KB-H055: Wrongly detected on Conan v2 #488

Closed
Linux13524 opened this issue Mar 27, 2023 · 3 comments
Closed

[conan-center] KB-H055: Wrongly detected on Conan v2 #488

Linux13524 opened this issue Mar 27, 2023 · 3 comments

Comments

@Linux13524
Copy link

When enabling the conan-center hooks with Conan v2 we get the following error:

[HOOK - hook_conan_center.py] pre_export(): ERROR: [SINGLE REQUIRES (KB-H055)] Both 'requires' attribute and 'requirements()' method should not be declared at same recipe. (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H055)

However we are not setting the method def requirements() and the attribute self.requires at the same time, we only use the method.

Did something change with Conan V2 that could lead to the self.requires attribute being detected by mistake?

@uilianries
Copy link
Member

Hello @Linux13524 the conan-center.py hook is not adapted for Conan 2.x and won't be.

Also, the disabled-hook_conan-center-v2.py is not well ported, that's why it's named as disabled.

So, there is no such support for Conan v2 yet.

We need to rethink about hooks, as there are features not used on Conan v2 and also CCI counts with linters.

@Linux13524
Copy link
Author

Ah, I see. I supposed the disabled-hook_conan-center-v2.py is already ready for Conan V2.

Thanks for the clarification!

@uilianries
Copy link
Member

@Linux13524 sorry, it's not well documented, but we tried to adapt it for Conan v2 and run over Conan Center Index, but not all cases were covered and started to fail for many recipes. It should be broken now, but actually we need to re-model it as many features changed from Conan 1.x to 2.x. I'll open a PR documenting it, because you are not the first one which tried to use Conan center hook and is surprise by an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants