question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] Do versioning conflicts between dependencies cause missing packages?

See original GitHub issue

Hi, I’m having some issues with dependencies’ versions mismatch between a consumer project and its dependencies. It forced conan to report that the dependencies were missing and requiring building missing packages from source.

Let say I have:

  • a project A depending on project B.
  • Both of the projects depend on C.
  • However, A requires C version 1.
  • B requires C version 2.
  • B’s package was already built with C version 2.

In this case, when building A’s package, conan reported that the prebuilt package of B is missing.

Is there a way to mix and match common dependencies between projects like that. It’s inconvenient that all projects have to require the same dependencies’ versions considering the projects are controlled by different teams.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
memshardedcommented, Mar 24, 2021

Btw, can I have one more question? Some dependencies’ versioning conflicts didn’t force source rebuild at all. May I know what is the default binary compatible mode?

Sure, the current default mode is semver_direct_mode. Which means, a new binary will be required if the direct declared dependencies (not the transitive ones) bumps their major version, or if its major version is zero 0.X.Y and minor or patch changes. It can also fire for dependencies not following semver specification (using letters, or any other non conformant version). It is not a very good default but it was there since very early in the beginning, and it couldn’t be changed without breaking. Most likely Conan 2.0 will use another default. The other modes that can be selected, like minor_mode, recipe_revision_mode, etc., are all transitive, they will include both the direct dependencies and the transitive dependencies.

0reactions
kakashidinhocommented, Mar 24, 2021

I’m just thinking if the 2 projects are shared library and they are statically linked against the same lib but different versions, it shouldn’t be an issue.

Yes, that can be problematic as well. Even for shared libraries, depending on the encapsulation and isolation and what is passed in the API, could break things at runtime in ugly ways. As a general rule, the same library, with the same version and configuration must be used to avoid problems.

I know this. Anw, this enforcement basically causes the same Microsoft VC++ library’s compatible hell which requires us to build multiple versions of a static lib, one for each version of Visual studio.

Btw, can I have one more question? Some dependencies’ versioning conflicts didn’t force source rebuild at all. May I know what is the default binary compatible mode?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Found conflicts between different versions of the ...
This warning means that two projects reference the same assembly (e.g. System.Windows.Forms ) but the two projects require different versions.
Read more >
Misleading error does not distinguish between ... - GitHub
Pip gives the error "Cannot install XYZ because these package versions have conflicting dependencies" when there is no dependency conflict.
Read more >
Troubleshoot dependency version conflicts - Azure
An overview of how to troubleshoot dependency version conflicts related to using the Azure SDK for Java.
Read more >
The Nine Circles of Python Dependency Hell - Medium
You may see a version conflict if your dependencies are demanding a specific version of a library that you don't currently use in...
Read more >
Problems with conflicts and broken dependencies
Problem 4: problem with installed package sssd-ipa-2.6.2-4.el9_0. ... same issue with missing samba-client-libs package for the version ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found