-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[question] Force package versions for "paired" recipes #23783
Comments
Is the issue not covered by something like this?
I'm not sure it covers two (or more) regular requires for dependencies that should have the same version - if the recipes could express this, would that fix the issue? I'm not sure that's the same experienced here: #23684 - this is just a regular conflict - even if |
The situations I'm referring to don't have anything to do with build requirements, these are all in the host context. I suppose you're correct in that this is a regular conflict, but perhaps I could explain it a different way: If my recipe is requiring |
I guess the least we can do is to check in EDIT: it's already checked : https://github.com/conan-io/conan-center-index/blob/master/recipes/vulkan-loader/all/conanfile.py#L75-L77 Maybe we should raise an exception instead (after doing an actual range comparison) |
What is the range comparison that is |
@SpaceIm could you please explain us the range your were talking about in 20fc0fe#diff-12dbf15b28e21af44691fedb226499a084ebc793ff1efbc12ce9b43f316401abR84 ? |
For example vulkan-loader 1.2.168.0 is compatible with 1.2.168.x versions of vulkan-headers. |
I see, so for 1.2.168.0 we would need a version range like ver = Version(self.version)
required_vulkan_headers_version = f"{ver.major}.{ver.minor}.{ver.patch}"
self.requires(f"vulkan-headers/[~{required_vulkan_headers_version}]) Or maybe if it requires a greater-or-equal tweak version: vk_headers_next_patch_version = f"{ver.major}.{ver.minor}.{ver.patch + 1}"
self.requires(f"vulkan-headers/[>={self.version} <{vk_headers_next_patch_version}]) Proposed with |
In "package pairs" such as vulkan-headers/vulkan-loader (and tcl/tk, there are other pairs as well), it is expected that the versions of the pairs should always be the same. Without force=True, we run into possible conflicts if there is another requirement for the first package. We usually resolve this by bumping the versions, but we cannot due that in this case since they are pinned together.
See this issue for an example of this happening: #23684
I propose that we add
force=True
to these "paired" dependencies, so that way the versions always stay together and don't cause conflicts.The text was updated successfully, but these errors were encountered: