Git Product home page Git Product logo

Comments (5)

memsharded avatar memsharded commented on July 21, 2024

Hi @devlpr

Thanks for your report.

I am not sure this is a bug, but intended and expected behavior. The override=True are not real dependencies, they are just a definition of a version change upstream, but it doesn't create a direct dependency from the caller to the required package.

I am not sure why this would be a problem, if you can please elaborate. This has worked always the same in Conan 1 and Conan 2, the behavior is exactly the same, so I don't fully understand why this would be a problem in the upgrade.

from conan.

devlpr avatar devlpr commented on July 21, 2024

We have not moved to Conan 2 yet. This is in Conan 1. The problem is that when we go to release, we run some operations on each package. When overriding versions, the list is empty, so we can't do those operations. So we can't use overrides. But sometimes we can't resolve versions, so we need overrides. It's a catch 22.

I think our expectation of an override is that the dependency tree is walked and when an overridden package is found, it simply uses the version in the override. It's overriding a dependency. So even if the override itself isn't a real dependency the actual dependencies should still act the same. By overriding, we aren't removing them. But that is how it's acting currently.

from conan.

memsharded avatar memsharded commented on July 21, 2024

Then if I understood correctly what you want is:

def requirements(self):
        self.requires("sdk/0.2.3@ai/release", force=True)
        self.requires("clock-synchronizer/1.0.4@ai/release", force=True)

This will work both in Conan 1 and Conan 2, overriding the upstream dependencies versions in both cases and being a direct dependency and listed in self.dependencies in both cases. Can you please give it a try and let me know?

An extra recommendation, just in case: overrides and forces are recommended only as temporary workarounds to upstream conflicts and version issues in the graph. The recommended and stable approach is to fix those issues in the recipes upstream

from conan.

devlpr avatar devlpr commented on July 21, 2024

Interesting. I will try this ASAP. I don't think we tried this yet. Thank you for this. If it works I owe you a beer!

As for overrides and forces, it's a long story how we got here, but I will say that we know better and we are trying to remedy our situation as soon as possible. With that fix, we are moving to Conan 2 so we can pick up the latest and greatest, and perhaps even contribute if needed.

from conan.

memsharded avatar memsharded commented on July 21, 2024

Interesting. I will try this ASAP. I don't think we tried this yet. Thank you for this. If it works I owe you a beer!

Always happy to help, just keep me posted, if this works that is the best for me too :)

As for overrides and forces, it's a long story how we got here, but I will say that we know better and we are trying to remedy our situation as soon as possible. With that fix, we are moving to Conan 2 so we can pick up the latest and greatest, and perhaps even contribute if needed.

One of the cool features in Conan 2 is the new [replace_requires] that also allows to temporarily fix conflicts without modifying conanfile.py recipes, so after fixing the upstream issues, it is not necessary to change the recipes again.

from conan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.