-
Notifications
You must be signed in to change notification settings - Fork 11
Idea: Disroop Multi Package Tool
Let’s assume we have a project which contains multiple conan recipes C1, C2, C3, C4 and multiple profiles P1, P2. A specific example would be a project with conan recipes for , App, Hal, stm32wb55-hal, linux-hal and the conan profiles, clang-linux-x86, and gcc-arm. I will use this more specific example as an illustrative example. But it should easily be generalizable for other use cases.
The App requires the Hal package, which is a header-only package, the linux-hal package is a linux implementation for the hal API and requires the hal package
Dependency tree: App→ Hal ← linux-hal
The project also needs external packages like gtest which is required to run the unittests.
Build: build all packages with the clang-linux-x86 profile
The App still requires the Hal package. The stm32wb55 package is an ARM specific implementation for a specific hardware. In this example an stm32wb55 cpu.
Dependency tree: App→ Hal ← stm32wb55-hal
Build: build all packages with the gcc-arm profile which contains all compiler flags
Goal: I want to have a similar comfortable work experience as I am used in other ecosystem. For example a Maven Multi-Module Project.
== Idea
Here is the Idea.
I create tool named Disroop Multi Package Tool (DMPT). Let’s assume is a pip package. Or recomend me a other solution.
-
I would like to pass this project to the Disroop Multi Package Tool (DMPT) with a "DMPT-Configuration".
-
Tell/Configure DMPT with which profiles I want the project to get built
-
Define the project version to be built Example "…/1.2.3@disroop/development"
4.1.1 now DMPT has created/generated a conan workspace so I can use any IDE with a cmake integration.
4.2 Or i run DMPT create" for clean ci builds.
== DMPT internally does the following:
-
creates a dependency tree for each build profile and package with conan info. The vs-code-conan extension should just visualize this file which contains a dot graph.
-
find out which required dependencies belong to this project ( in this example A,B,C,D,E,F) and generate the needed conan ws files.
-
find out which required dependencies do not belong to this project (in this example gtest).
-
find out which of these dependencies must get built for the current profile.
In dev mode generate a workspace file with editables. Which one will be root?
-
In build mode create a list which has a correct build order.
Dev Mode in Detail: - In dev mode. Generate the workspace. So the developer can work on all packages of the project by using a plain cmake integration with incremental builds.
More Advanced Features:
Select a package and build all project dependencies that:
-
depend on this package including transitive deps.
-
This package depends on including transitive deps.
Implement DMPT in python.
By using the cli or maybe later using the python API
Vs-code-extension: add an integration to dmpt. The vs-code- extension shall just be the glorified dmpt and conan cli runner. (What an IDE actualy is)