Checklist
alr version
.Describe the bug
Have a project with at least two crates: a child one that depends on a root one (example of such project: https://github.com/stcarrez/gollum). On the root Alire crate, use a pins
of some repository. In that configuration:
The root crate is defined with:
[[depends-on]]
utilada = "^2.6.0"
[[pins]]
utilada = { url="https://github.com/stcarrez/ada-util.git" }
and the child crate is defined with:
[[depends-on]]
gollum = "*"
[[pins]]
gollum = { path='..' }
alire/cache/pins/utilada
smeagol/alire/cache/pins/utilada
Due to this double extraction, files from the root project are sometimes re-compiled because the GPR_PROJECT_PATH
changes between when we build the two GNAT projects, even if share the build object files between the two projects. For large project, this means long and annoying multiple compilations (a bigger project where I'm having the issue is https://gitlab.com/stcarrez/spdx-tool where there are 2 crates that depend on a root one).
In root project, we get:
export GPR_PROJECT_PATH="/src/vacs/gollum:/src/vacs/gollum/alire/cache/pins/utilada:/src/vacs/gollum/alire/cache/pins/utilada/.alire"
export UTILADA_ALIRE_PREFIX="/src/vacs/gollum/alire/cache/pins/utilada"
and in the child project we get:
export GPR_PROJECT_PATH="/src/vacs/gollum:/src/vacs/gollum/smeagol:/src/vacs/gollum/smeagol/alire/cache/pins/utilada:/src/vacs/gollum/smeagol/alire/cache/pins/utilada/.alire"
export UTILADA_ALIRE_PREFIX="/src/vacs/gollum/smeagol/alire/cache/pins/utilada"
To Reproduce
Steps to reproduce the behavior:
Expected Behavior
We should only have one extraction of the pinned projects and the child crate should use the parent's crate pinned dependencies
alr
version
APPLICATION
alr version: 2.1.0-dev
libalire version: 2.1.0-dev
compilation date: 2024-03-17 09:42:40
compiled with version: 12.1.0
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too