Comments (5)
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.
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.
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.
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.
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)
- [bug] Github actions fail when set `tools.system.package_manager:mode` HOT 2
- [question] How to depend on a specific Git commit or branch of a project HOT 7
- [bug] build_requires with different #RREV are not used correctly HOT 2
- [question] What is the correct way of exposing PATH when packaging library type? HOT 2
- [bug] CMakeToolchain changes the value of string variables unexpectedly/incorrectly HOT 6
- [feature] [question] Support the Tricore-gcc toolchain and arch
- Incorrect generation of file conanvcvars.ps1 HOT 2
- [question] Conan centre package rereleases HOT 9
- [question] Should Visual Studio 17.10 require a profile update to 194? HOT 38
- [bug] Multiple `--build=missing:~foo` does not work HOT 3
- [bug] Conan setting `CMAKE_FIND_ROOT_PATH_MODE_*=BOTH` fundamentally breaks cross-compilation HOT 4
- [feature] Add a --skip-generator option HOT 4
- [feature] Allow multiline blocks and inline comments in profiles HOT 1
- [question] Handling package that is platform and variant agnostic but not the tests in the package HOT 30
- [question] Install from local recipes index with user/channel HOT 9
- [bug] requires of a dependency of a dependency in build context not visible HOT 5
- [question] How to modify global.conf HOT 10
- [bug] conan.tools.build.check_min_cppstd does infer default cppstd as documented HOT 3
- [question] Inject toolchain.cmake from RTOS library package via user_toolchain HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.