Git Product home page Git Product logo

Comments (3)

memsharded avatar memsharded commented on July 19, 2024

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.

pwqbot avatar pwqbot commented on July 19, 2024

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.

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.

memsharded avatar memsharded commented on July 19, 2024

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)

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.