You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
Let us say I have a conanfile.txt and want to install 'shared' packages
conan install ... -o *:shared=True
At the same time, I want to have some of them 'static'.
In conanfile.txt I specify:
[options]
grpc*:shared=False
It worked as expected in Conan1, but it is not working in Conan2.
Conan2 still wants to install 'shared' grpc (which is not available on Windows, for example)
Is this change by design? Or, is it a bug?
Thanks
Have you read the CONTRIBUTING guide?
I've read the CONTRIBUTING guide
The text was updated successfully, but these errors were encountered:
Thanks for your question.
This was actually a deliberate change in Conan 2.0, to better align with the general priority rules.
In this case, the rule is that the user command line (or profile) always have the top priority. If the command line says that all packages must be shared, then all packages must be shared. No way that some conanfile in the graph can tell something different. This was done to give real control to the user/consumer, otherwise there were situations when users wanted to define something in the dependency graph, like actually making sure that all libs are shared, and they couldn't do it because some recipe in the middle was saying otherwise. Conan 2.0 new behavior respects better the principle that "final users should always have full control".
Said that, we have this ticket #14764, to investigate if we could have some other intermediate or compromise way that allows both full user control but also giving some more space for conanfile to define dependencies options.
So Conan 2.0 recommended approach would be to define grpc*:shared=False in the command line (or much better, in a profile file).
As #14764 already captures this issue, I'd suggest closing this one and following up on the other.
What is your question?
Hi
Let us say I have a conanfile.txt and want to install 'shared' packages
At the same time, I want to have some of them 'static'.
In conanfile.txt I specify:
It worked as expected in Conan1, but it is not working in Conan2.
Conan2 still wants to install 'shared' grpc (which is not available on Windows, for example)
Is this change by design? Or, is it a bug?
Thanks
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: