-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
New shared builds mechanism (mockup) #1419
Conversation
33fc957
to
03f9772
Compare
encouraged to use the pin system. | ||
|
||
If these default locations for shared dependencies must be relocated, this can | ||
be achieved by using a new configuration path (`ALR_CONFIG` or `-c` global |
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.
It could be useful to have a separate option/env-var for the cache.
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.
I'll create an issue to track this.
------------------- | ||
-- To_Msys2_Path -- | ||
------------------- | ||
-- Convert C:\blah\blah into /c/blah/blah. This is needed because otherwise |
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.
We should try to avoid msys2 specific behaviors like that. And that probably means removing the dependency on an rsync
executable.
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.
Actually rsync is probably overkill since the new folder should either exist or not at all, so a full copy is OK. I was for some reason too focused on using rsync. I take note for a follow-up PR.
); | ||
-- TODO: this may take some time, and rsync doesn't have a way | ||
-- to show oneliner progress, so at some point we may want to use | ||
-- something like GNAT.Expect for our spawns, and spin on newlines |
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.
Or the Spawn library https://github.com/adacore/spawn
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.
either spawn or GNATCOLL.OS.Process - spawn is higher level and suited for integration in a main loop. GNATCOLL.OS.Process is lower level and leaves the user more things to do, but is an easier in-place replacement for GNAT.Expect. Both are superior to GNAT.Expect since they allow separating stdout and stderr, and allow controlling the environment of the spawned process without affecting the parent's environment.
This introduces most infrastructure needed for the new build system. It's still disabled by default (although some tests check it already) because it's missing the hash computation, which will come in a follow-up PR.
Instead of the real hash, the same unique fake hash is always used. Hence, enabling it now roughly works like the previous
dependencies.dir
worked, as there will be only one build config per release, except that there are already separate locations for "read-only" sources and build sources.There are also some assorted TODOs through the code for future optimizations, but the functional part is complete (again, but for the hash computation).
A summary of the new modus operandi is in
alire-builds.ads
.