-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply general scope options to consumer Conanfile first #3361
Conversation
default_options= "shared=False" | ||
requires = "libA/0.1@danimtb/testing" | ||
|
||
def configure(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test looks a bit complex for the use case. Just defining -o *:shared
in the command line should be enough to check it, wouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. this is in fact the real issue this is testing. Read the description in the PR comments
But, why would you type |
because you want to build your hole dependency graph with that option. So when the consumer project declares that option, all dependencies are the same. I know it makes no sense to have that line and use the command:
You'd rather use:
First does NOT work, second does. But the weird thing for the user is that it also works for:
Yes |
* Apply general scope options to consumer first * try descop options * improved test and changed fix * Improved test with create and install
The real issue was this line in
configure()
:And user input with something like
conan install -o *:shared=True
.Basically, options with
*
operator are reserved for the graph builder to be applied to requirements when graph is complete. The option with*
is not applied initially to the consumer conanfile and when it hits the line above in configure, changes the general scope option to its default value (shared=False
).develop
branch, documenting this one. Also adding a description of the changes in thechangelog.rst
file. https://github.com/conan-io/docs