project_options icon indicating copy to clipboard operation
project_options copied to clipboard

Adding an option for not adding the default Conan remotes

Open fgallegosalido opened this issue 3 years ago • 2 comments

Currently, the conan section forces the addition of both the conan-center-index and bincrafters remotes by default. Even though the comments state that we can remove remotes, I can't figure out how to do it without calling conan through add_custom_command or something like that.

The thing with adding bincrafters by default is that it sometimes complains about some env variables not defined. For that reason, and the fact that not everybody is going to use dependencies from the bincrafters remote, I propose to remove its addition and let the users decide whether they want to add it or not. Maybe a wrapper around conan_add_remote could be added to ease the job for users.

fgallegosalido avatar Sep 04 '22 08:09 fgallegosalido

The current default works for most of the users. We can add an option that skips the addition of the remotes.

aminya avatar Sep 04 '22 09:09 aminya

Something I forgot to mention is that bincrafters recipes seem to be slowing down quite a bit. This could mean that, once Conan V2 is released, many recipes can stop working all together. As the officially mantained ones are from the Conan Center Index, I would add that remote by default (maybe add an option, but most users use this remote) and just not add the bincrafters at all.

fgallegosalido avatar Sep 04 '22 09:09 fgallegosalido

To me the problem is really that it uses a different name that the conan default, so basically it renames conancenter to cci for 99% of users.

https://github.com/aminya/project_options/blob/53eb453c5918c94e9e5041fba55b2f7362ddc293/src/Conan.cmake#L23-L29

This is the conan default:

https://github.com/conan-io/conan/blob/c3fc425871149b12a1d12153bed90a06a3d20132/conans/client/cache/remote_registry.py#L14

CONAN_CENTER_REMOTE_NAME = "conancenter"

jmarrec avatar Jan 05 '23 14:01 jmarrec

Fixed in #185

aminya avatar Jan 09 '23 18:01 aminya