docs icon indicating copy to clipboard operation
docs copied to clipboard

Misleading override example using conanfile.txt

Open petermbauer opened this issue 7 years ago • 5 comments

https://docs.conan.io/en/latest/using_packages/conanfile_txt.html#overriding-requirements Though this is declared as "... a good example of overriding requirements .." it is missleading since it does not mention the override parameter like it is done here: https://docs.conan.io/en/latest/reference/conanfile/attributes.html?highlight=override#requires It do not know whether "real overrides" can be done within a conanfile.txt and if it is not possible this should not be used as an example.

petermbauer avatar Nov 22 '18 10:11 petermbauer

Is there any update on this? @petermbauer did you find a way to properly use the override parameter in a conanfile.txt?

nioncode avatar Jun 03 '20 14:06 nioncode

@petermbauer did you find a way to properly use the override parameter in a conanfile.txt?

Sorry, i never used a conanfile.txt.

petermbauer avatar Jun 03 '20 14:06 petermbauer

Yep, there is no way to declare that directly in the conanfile.txt a conanfile.py is necessary.

memsharded avatar Jun 03 '20 14:06 memsharded

Thanks, then this should be added in the documentation, since I tried with a few markups to make these work in my conanfile.txt, but had (obviously) no success.

nioncode avatar Jun 03 '20 17:06 nioncode

Agree, it would be good to have the fact documented somewhere that override cannot be specified in a conanfile.txt. Or even better: allow it. :) I'd suggest to use the same syntax for additional attributes as what is already supported for imports:

[requires]
mypackage/1.2.3 @ override=True

chausner-audeering avatar Jan 11 '21 16:01 chausner-audeering