conan-io / hooks

Official Conan client hooks
MIT License
32 stars 44 forks source link

conan config set hooks.conan-center does not work #506

Open jalapenopuzzle opened 1 year ago

jalapenopuzzle commented 1 year ago

The setup instructions at https://github.com/conan-io/hooks#hook-activation give the following instruction:

conan config set hooks.conan-center

However, when I try this with conan 2.0.7 (current version), it says:

conan config set hooks.conan-center
usage: conan config [-h] [-v [V]] {home,install,list,show} ...
conan config: error: argument subcommand: invalid choice: 'set' (choose from 'home', 'install', 'list', 'show')
ERROR: Exiting with code: 2

It seems that set has been removed from the list of choices.

The instructions also mention setting up a conan.conf file, but do not mention WHERE this file should be placed.

Please advise how to set up the conan hooks, which is required to be able to raise pull requests against https://github.com/conan-io/conan-center-index.

uilianries commented 1 year ago

@jalapenopuzzle These hooks are not really prepared for Conan 2.0 (https://docs.conan.io/2/reference/extensions/hooks.html#official-hooks), the conan-center is one that is not ready.

The ConanCenterIndex does not use hooks with Conan 2.x, only Conan 1.x is running with hooks there.

For Conan 2.x, we should re-visit hooks in the future, as many features and rules are already covered by Conan 2.x.