You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if the existing behaviour is intended or not.
When pinning to a remote create in a monorepo, you can provide the URL and the crate name and Alire will add the dependency. However, when you examine the environment of the enclosing crate, the GPR_PROJECT_PATH is set to the root of the monorepo, not to the root of the crate within the monorepo. Consequently, the build will not find the dependency's project file.
For example, if this is the folder structure of the remote repo:
Then when you pin the dependency crate, the GPR_PROJECT_PATH is set to /monorepo, not /monorepo/dependency.
I can update the alire.toml environment to add the path, but I think it should probably be done automatically.
The text was updated successfully, but these errors were encountered:
dalybrown
changed the title
pinning a create in a remote monorepo (i.e., using --use=URL) does not setup GPR_PROJECT_PATH
pinning a crate in a remote monorepo (i.e., using --use=URL) does not setup GPR_PROJECT_PATH
Feb 1, 2024
Yes, this should work for pins just as it works for regular dependencies. Thanks for the report.
The root cause will likely be that for regular dependencies we rely on the origin info from the index, that is not used for pins (we rely on their local manifests), and I don't think from memory that we are using any origin info in that case.
I'm not sure if the existing behaviour is intended or not.
When pinning to a remote create in a monorepo, you can provide the URL and the crate name and Alire will add the dependency. However, when you examine the environment of the enclosing crate, the GPR_PROJECT_PATH is set to the root of the monorepo, not to the root of the crate within the monorepo. Consequently, the build will not find the dependency's project file.
For example, if this is the folder structure of the remote repo:
/monorepo/dependency/alire.toml
/monorepo/dependency/project.gpr
Then when you pin the dependency crate, the GPR_PROJECT_PATH is set to /monorepo, not /monorepo/dependency.
I can update the alire.toml environment to add the path, but I think it should probably be done automatically.
The text was updated successfully, but these errors were encountered: