-
Notifications
You must be signed in to change notification settings - Fork 970
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Prevent overriding dependency versions #4473
Comments
Hi @salessandri!
No, if the project declares the override/require to D it will use it in the whole graph, in general, any intermediate require resolves conflicts upstream. We don't have a mechanism to block the overrides. I don't know if it helps but if you want to automate the check task you could run a [
{
"revision":"95fa8a06e701a3827a999668979b5e2e",
"reference":"LIB_B/0.2.0@user/channel",
"is_ref":true,
"display_name":"LIB_B/0.2.0@user/channel",
"id":"75448e85a06e45c0071d9853d912f348a78c06c9",
"build_id":null,
"recipe":"Cache",
"binary":"Missing",
"creation_date":"2019-02-06 08:30:19",
"required_by":[
"conanfile.py (PROJECT/1.0@None/None)"
],
"requires":[
"LIB_D/0.1.0@user/channel"
]
},
{
"revision":"8fcfcefd1d676b8a78e3d1d5fd4cb11e",
"reference":"LIB_C/0.1.0@user/channel",
"is_ref":true,
"display_name":"LIB_C/0.1.0@user/channel",
"id":"75448e85a06e45c0071d9853d912f348a78c06c9",
"build_id":null,
"recipe":"Cache",
"binary":"Cache",
"creation_date":"2019-02-06 08:30:17",
"required_by":[
"conanfile.py (PROJECT/1.0@None/None)"
],
"requires":[
"LIB_D/0.1.0@user/channel"
]
},
{
"revision":"ff526ddc6ece04b18e4637ef41a1ca88",
"reference":"LIB_D/0.1.0@user/channel",
"is_ref":true,
"display_name":"LIB_D/0.1.0@user/channel",
"id":"5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9",
"build_id":null,
"recipe":"Cache",
"binary":"Cache",
"creation_date":"2019-02-06 08:30:16",
"required_by":[
"LIB_C/0.1.0@user/channel",
"LIB_B/0.2.0@user/channel",
"conanfile.py (PROJECT/1.0@None/None)"
]
},
{
"reference":"conanfile.py (PROJECT/1.0@None/None)",
"is_ref":false,
"display_name":"conanfile.py (PROJECT/1.0@None/None)",
"id":"912d0e9c6afb67d0386f383a550ba83fe0fa3950",
"build_id":null,
"requires":[
"LIB_B/0.2.0@user/channel",
"LIB_C/0.1.0@user/channel",
"LIB_D/0.1.0@user/channel"
]
}
] |
I think I am struggling with this issue too. Can I ask what you mean by:
Do you mean that in the package_id() of PROJECT you are implementing:
as mentioned in: https://docs.conan.io/en/latest/creating_packages/define_abi_compatibility.html#versioning-schema |
@michaelmaguire Yes, that's what I'm doing but in an easier way:
That makes it apply to all the requires. Also I need to run I really hope they add a way to explicitly override the arguments from the top level but not do it silently. |
Related to #2800 |
We are introducing an opt-in |
Hi! I'm implementing this behavior in the linked PR, I wanted to share with you the proposed config variables names I am using:
If anyone of you have a better idea for the naming, please, contribute. Thanks! |
I'm fine with those. But, it seems that |
@lasote, I'm not sure about this functionality (about the explicit override), the docs says:
So, in the use-case exposed above, enabling the |
That is what I tried to explain to you in the last whiteboard. That use case is missing. And we agree on just enabling the way to raise. There is a missing way to say "I'm depending on this and I know I'm overriding, so don't raise". |
My situation is the following:
PROJECT/0.2.0
->B/0.1.0
,C/0.1.0
,D/0.1.0
B/0.1.0
->D/0.1.0
C/0.1.0
->D/0.1.0
Until then, everything's fine. Now there's a new version of B that leads to the following:
PROJECT/0.3.0
->B/0.2.0
,C/0.1.0
,D/0.1.0
B/0.2.0
->D/0.2.0
C/0.1.0
->D/0.1.0
I am defining
full_version_mode()
everywhere. If PROJECT did not depend on D, Conan would fail saying that the dependencies are incompatible. But if D happens to be a dependency of the project too, then it will override any dependencies' usage of D to its version.Is there a way to prevent this from happening and have it fail if there are any 2 versions of the same library that are different/incompatible?
If I do not set
build=missing
it's ok for me because it will basically not find thepackage_id
for the library with the overridden dependency. But I'd rather have it fail at the dependency graph analysis and re-enable thebuild=missing
option.The text was updated successfully, but these errors were encountered: