Comments (3)
Hi @pwqbot
Thanks for your question.
You have the direct_deploy
that only deploys the direct reference, not the dependencies.
But I guess you don't mean that, but the fact that Conan is resolving the dependency graph. It is indeed necessary to compute the dependency graph, because the binary that is pulled when you do conan install --requires="mypkg/version"
also depends on the dependencies and transitive dependencies. For example if mypkg
is an application, and the dependencies are static libraries, it might be necessary to re-build mypkg
from source to get an update binary. Only computing the dependency graph allows to compute updated package_ids
and making sure the thing that is being deployed is what is expected.
Conan has the "skip" binaries mechanism, so if things are updated and all is looking good, Conan will mark most of the binaries as "skip" and avoid pulling the dependencies if they are not necessary (like all static libraries will be skipped), making the process efficient.
If all you want is access to the artifacts for a given pkg/version:package_id
, then you can do conan download + conan cache path
for that specific package-id, and copy the files from the package. If you want to do something more advanced (without modifying the cache, that is not allowed), then you might want to wrap that in a custom command instead of trying a deployer, and your custom command can download
the specific package-id and do what you want. But that is a different approach than the deployers
that are designed to do operations on a dependency graph, not on one package.
from conan.
Hi @pwqbot
Thanks for your question.
You have the
direct_deploy
that only deploys the direct reference, not the dependencies.But I guess you don't mean that, but the fact that Conan is resolving the dependency graph. It is indeed necessary to compute the dependency graph, because the binary that is pulled when you do
conan install --requires="mypkg/version"
also depends on the dependencies and transitive dependencies. For example ifmypkg
is an application, and the dependencies are static libraries, it might be necessary to re-buildmypkg
from source to get an update binary. Only computing the dependency graph allows to compute updatedpackage_ids
and making sure the thing that is being deployed is what is expected.Conan has the "skip" binaries mechanism, so if things are updated and all is looking good, Conan will mark most of the binaries as "skip" and avoid pulling the dependencies if they are not necessary (like all static libraries will be skipped), making the process efficient.
If all you want is access to the artifacts for a given
pkg/version:package_id
, then you can doconan download + conan cache path
for that specific package-id, and copy the files from the package. If you want to do something more advanced (without modifying the cache, that is not allowed), then you might want to wrap that in a custom command instead of trying a deployer, and your custom command candownload
the specific package-id and do what you want. But that is a different approach than thedeployers
that are designed to do operations on a dependency graph, not on one package.
Thanks! I think download + cache path
may work. How to query for package id with params like package/version -s build_type=Debug -pr x86_linux_gcc_13_Debug -pr:b x86_linux_gcc_13_Debug
?
from conan.
Thanks! I think download + cache path may work. How to query for package id with params like package/version -s build_type=Debug -pr x86_linux_gcc_13_Debug -pr:b x86_linux_gcc_13_Debug?
With conan graph info ...
passing those arguments. Note that this will compute the dependency graph, as commented above the package_id
is also a function of the dependencies versions and revisions, so it is necessary to compute the graph, even if the binaries for the dependencies are not downloaded.
Alternatively, the conan list
command has the --filter-profile
and --filter-settings
that can help listing the packages that matches some profiles and settings, but not this is just a filter of the existing binaries that matches those conditions, not an update package_id
computation.
from conan.
Related Issues (20)
- [bug] detect_api.detect_msvc_compiler() returns an incorrect version HOT 1
- [question] How to use source_buildenv HOT 5
- [question] Is it possible to check arguments passed in the CLI in the profiles? HOT 1
- [question] How to use Ninja with `CMake` helper? HOT 6
- [question] Issue with Custom Deployer - Dependencies Pointing to Cache Folder HOT 3
- Cross compiling macos x86_64 library on macos arm64 - what is best practice HOT 4
- [question] How to create package with submodule HOT 11
- [question] Manually injecting Requires.private into pkg-config modules HOT 2
- [question] When testing a package from a test_package folder how can I ensure that the macro PKG_API_STATIC_DEFINE is defined in the test project when --option:all=pkg/*:shared=False is used? HOT 4
- Easiest way to get the URL from a ref in Conan 2 HOT 8
- [question] How to manage cross-compilation with existing Linux Image and sysroot/libraries
- [bug] Recipes with invalid remote URLs in conandata can be uploaded HOT 7
- [question] Why is self.settings_target None ? HOT 2
- [bug] In build-order.json, build_args is wrong when options have whitespaces HOT 4
- [question] Dependency loop when including gcc as a profile tool_requires HOT 3
- [question] What is the recommended way to read environment variables HOT 2
- [feature] System cache HOT 5
- [question] export-pkg failes on dependencies for a standalone application [conan 2] HOT 9
- [question] system_requirements only needed for building HOT 2
- [question] Using deployers to get Conan package binaries without invoking Conan generators HOT 4
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.