Use of Alire and aggregate projects

I’m currently using aggregate projects so I can work on several dependencies (libraries), and their test projects (binaries) at the same time. Consider the following structure:

  • MainProject
    • LibA (Library Project)
      • Src
      • Tests (binary project)
        • Src (folder)
    • LibB
    • LibC
    • SomeProgram (binary project)
      • Src

Now I have aggregate project for each dependency that aggregates the lib .gpr file and the tests binary .gpr file. So I was opening inside GNATStudio the aggregate project and I would have access to both the library and tests binary. I was doing that on macOS and it was working correctly.

Now I have moved to Linux, and when I launch with alr edit, it only opens the crate project, not the aggregate project. And if I launch gnatstudio, it cannot find gpr files of dependencies, I think I need to configure some path for it.

So my question is, how do you normally handle this configuration? Project with several crates as dependencies that you want to open completely with all dependecies and their test projects so everything is available to edit?

Welcome in club. I posted my answer in other threads many times. You need a proper project management system.

Without a project management system (which will never come) flatten the structure and use ADA_PROJECT_PATH accompanied with relative paths inside gpr-files to make the structure invariant to the project. Write gpr-files so that object and ali-files folders would depend on the scenario.

You can create one more Alire’s crate with single aggregated project file, and pin all your projects in alire.toml. It should be enough to populate necessary environment to find all project files.

Thank you. I’ll try it out.