-
Notifications
You must be signed in to change notification settings - Fork 989
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
Downstream version override caused problems #2800
Comments
Everything you specify in the conanfile is interpreted as a possible override. That is the way the final user gets fool control of the dependency graph. Probably there is some message in the output about the overridden boost. |
Ok, I see. However, this behavior was quite inconvenient for me. Is there a way to change it? |
Not currently. |
By "conanfile" you mean conanfile used for In my example, when |
Yes
No, because your conanfile contains |
I have a similar problem with version incompatibilities in my package's dependency graph: Some dependencies of the main package require different versions of We build all packages ourselves, so we have full control over the required versions and could re-build any package with the correct requirements. However, it is easy to overlook the warning message (particularly in the CI) and introduce an incompatible combination of versions. Is there any way to make my recipe throw/fail when it encounters incompatible package requirements, instead of just printing a warning message? That would greatly reduce our risk of linking incompatible binaries. |
There is no currently a mechanism for error on an override, but I think it could make sense to introduce a |
I'd like an error on override too, but please don't make it (only) a global setting. That is not a personal preference but rather team-by-team requirement that will need to be changed based on what project you're developing at the moment. Think about the case of a professional developer that also works on open source software in his/her free time. |
I don't think the behavior of Conan should be this one. You should specify it clearly in you conanfile that that requirement it is an override instead of a normal requirement. Otherwise, Conan should error a conflict! I think this is the main problem reflected on this issue and should be solved before creating a config entry to raise errors in those cases. |
@DavidZemon I have different virtual environments for personal/hobby projects and for professional ones, switching one to other modifies some environment variables so I do not mix both workspaces (I change |
I have
restsdk/2.6.0-1
, which depends onboost/1.58-1
. Note that this "-1" part is our "revisions" that allows us to achieve build reproducibility. We updated boost to version 1.66 and createdboost/1.66-1
. We also rebuilt restsdk with this version and obtainedrestsdk/2.6.0-2
, which depends onboost/1.66-1
. Ok, then in my conanfile for solution I updated boost toboost/1.66-1
, but I forgot to update restsdk torestsdk/2.6.0-2
and I still hadrestsdk/2.6.0-1
instead. I would expect, that conan issues an error, thatrestsdk/2.6.0-1
requiresboost/1.58-1
, while I haveboost/1.66-1
in my conanfile. However, instead conan installed packages just fine and I spent some time figuring out what's going on! Why conan did not warn me?..The text was updated successfully, but these errors were encountered: