-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Set up environment before post-fetch actions #456
Conversation
begin | ||
Requires_Full_Index; | ||
|
||
Requires_Valid_Session; | ||
|
||
Alr.Build_Env.Export (Alr.Root.Current); | ||
if Export_Build_Env then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If would be nice to export the environment just when we need it, when spawning a command.
In python it is doable with popen
, but I don't know any similar API for Ada: https://docs.python.org/3/library/subprocess.html#subprocess.Popen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. That's too bad we don't have something portable like that in GNAT or GNATCOLL...
Looks like a great cleanup, thanks @mosteo :) |
5066328
to
bc31228
Compare
bc31228
to
2014406
Compare
370d5cf
to
8490f85
Compare
7df98fe
to
36b54ec
Compare
@Fabien-Chouteau, could you please take a look at the two last commits I pushed? These introduce changes since you reviewed. I'm going to check if something like |
It seems an option could be to rely on Boost.Process. According to their docs, this part of Boost is headers-only, so conceivably we could use it directly without changing anything in our build process. I haven't done any testing though. |
Don't worry about that, I was thinking out loud. What we have now is good I think. |
The path lookup has three levels: 1. For the root release, the own root folder 2. For a regular release, the dependencies folder "/" release unique folder 3. For a pinned softlink, the absolute path of the softlink The root contains the solution which in turn contains the softlinks, so the query for the path can be directly made to the root.
This flies by CE but is detected by FSF (?)
There's some bug manifesting when a lot of code is in the spec in which the linker complaints about missing references.
... in the Python testsuite
This is to match the output of full path normalization by Ada.Directories.
Fixes on top of #452 to ensure the environment is ready during post-fetch actions. Also, generate proper paths for softlinked dependencies.
This PR refactors
Alr.Build_Env
intoAlire.Environment
so environment generation is not split into two locations.