Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] How to inject tool packages into the dependency chain? #17732

Open
1 task done
fschoenm opened this issue Feb 7, 2025 · 0 comments
Open
1 task done

[question] How to inject tool packages into the dependency chain? #17732

fschoenm opened this issue Feb 7, 2025 · 0 comments

Comments

@fschoenm
Copy link

fschoenm commented Feb 7, 2025

What is your question?

I wonder if you have an idea for the following scenario?

Idea

I have the following tool packages; different compiler packages and a coverage package that uses a compiler package:

  • gcc/10.0.0 (provides g++10)
  • gcc/12.0.0 (provides g++12)
  • bullseye_coverage/9.0.0 (provides g++-10 and g++-12 as interceptors, which in turn calls the original g++-10 or g++-12)

The bullseye_coverage package in this example has no explicit dependency on any compiler package as I want it to work with any possible compiler.

I also have corresponding profiles that add a tool requirement to my build:

  • toolchain-gcc10
  • toolchain-gcc12
  • toolchain-coverage

Now I want to build a project with one of the compilers and either with or without coverage. I do this using profiles:

$ conan build . -pr toolchain-gcc10 -s build_type=Debug
$ conan build . -pr toolchain-gcc12 -s build_type=Release
$ conan build . -pr toolchain-coverage -pr toolchain-gcc12 -s build_type=Debug

I hope the general idea is clear. This approach kind of works in my experiments.

Question

The main problem that I have is that it depends on the order of the profiles on the command line if the above works. This has to do with the order of the paths in the PATH variable that results from the conan run. Unfortunately, I think there's no way to control this order, nor is the expected order documented. Do you have any idea, how this could be influenced?

What do you think of the above approach? Do you have a better idea of how to model optional or injected dependencies between tool packages that might help in this situation?

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@fschoenm fschoenm changed the title [question] SHORT DESCRIPTION [question] How to inject tool packages into the dependency chain? Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant