docs
docs copied to clipboard
Misleading override example using conanfile.txt
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.
Is there any update on this? @petermbauer did you find a way to properly use the override parameter in a conanfile.txt?
@petermbauer did you find a way to properly use the
overrideparameter in aconanfile.txt?
Sorry, i never used a conanfile.txt.
Yep, there is no way to declare that directly in the conanfile.txt a conanfile.py is necessary.
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.
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