Skip to content

[question] build-order-merge multiple files containing the asame package id with different contexts #18421

Closed
conan-io/docs
#4116
@bukulin

Description

@bukulin

What is your question?

Hi

I'm trying to use packages from the conan-center-index following the guideline here:
https://docs.conan.io/2/devops/conancenter/hosting_binaries.html

To keep the production environment as stable as possible, I'm also following the guideline here, using multiple repositories (packages, products, develop):
https://docs.conan.io/2/ci_tutorial/products_pipeline/full_pipeline.html

Furthermore:

  • I have debug builds, where the build_type is Debug in the host context, and Release in the build context
  • I require packages, that must be present in both the host and the build context. E.g. Qt, where uic, moc, rcc tools are used in build-time.

Now, during the execution of the packages pipeline I have build order files for debug and release builds. The important differences are:

  • Release

    • the build order file created with -pr:h default -pr:b default
    • qt/5.12.6#abc123:def456 required to build
    • qt/5.12.6#abc123:def456 is in host context
    • build_args contains --requires=qt/5.12.6
  • Debug

    • the build order file created with -pr:h default_debug -pr:b default
    • qt/5.12.6#abc123:def456 required to build (same as in Release build order file)
    • qt/5.12.6#abc123:def456 is in build context
    • build_args contains --tool-requires=qt/5.12.6

After the two build order files are merged (--reduce is applied) the resulting build order file contains a requirement for Qt like that:

  • qt/5.12.6#abc123:def456 required to build
  • qt/5.12.6#abc123:def456 is in host context
  • build_args contains --requires=qt/5.12.6
  • with two filenames: build_order_release, build_order_debug
  • In the profiles section:
    • build_order_release contains -pr:h default -pr:b default
    • build_order_debug contains -pr:h default_debug -pr:b default

My question is: how to figure out the required commandline arguments from profile section in the merged build order file?

  • If I concatenate all the profiles: -pr:h default -pr:b default -pr:h default_debug -pr:b default then the resulting build_type in the host profile depends on the order of the concatenation.
  • Doing some kind of matching between the name of the profile (build_order_release) and the info.settings.build_type = Release is kind of funky, what I like to avoid.

Any help, suggestion is highly appreciated

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

Labels

docsIssues related with improvements in the documentationstage: triaging

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions