[question] More details about overriding upstream options from downstream recipes
- Dominant language
- C++
- Stars
- 125
- Forks
- 382
- Avg merge
- 22h 39m
- Merged PRs (30d)
- 21
Description
- [x] I've read the [CONTRIBUTING guide](https://github.com/conan-io/conan/blob/develop/.github/CONTRIBUTING.md).
I still don't completely understand how and when upstream options are overridden, and which recipe takes precedence if multiple downstream recipes override options of a common upstream recipe.
https://docs.conan.io/en/latest/mastering/conditional.html claims that upstream recipes options should be overridden in `configure` method when it is absolutely necessary.
- If multiple recipes override the same upstream option, which recipe wins?
Let's say for these two cases:
- two direct parents override the same option of their common child.
- one direct parent and root override the same option.
- some recipes like https://github.com/conan-community/conan-opencv conditionally override several upstream options in `requirements` method instead of `configure` method. Can we expect the same behaviour as if they would have been overridden in `configure` method (in case of conflicts with other recipes, does overriding this option in `requirements` take precedence over overriding in`configure` method, without respect of rules in first point)? Is is the same to override after `self.requires("upstream")` or before, in `requirements` method? Is it bad practice to override in `requirements` method?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.