alire
alire copied to clipboard
alr build runs post_fetch action
I'm working on a patch for ada_language_server. When I run 'alr build', it executes a post_fetch action for xmlada:
alr --no-tty --no-color -v build --development
Full output attached as build.log. Apparently the problem is caused by this:
-> Detected missing dependency sources, updating workspace...
which then causes this:
Note: Running post_fetch actions for xmlada=23.0.0... -> Running action: Post_Fetch run: ${CRATE_DIR}/./sh configure -> Spawning: ["sh", "configure"]
So apparently that post_fetch action deletes some xmlada sources, or something. So maybe this is an issue with the xmlada crate? build.log
I noticed a very similar and possibly related issue: it does not run the post_fetch
action when running alr update
. For me it breaks a build script that requires xmlada because the post_fetch
action generates xmlada_shared.gpr
which is no longer available. For me the workaround is to run alr build
instead because it runs post_fetch
.
@jklmnn, this is with 1.2.2
I presume?
There are changes in 2.0
that will make the default the contrary (build
won't run post fetch
, but update
will)
1.2.2 works, but 2.0 breaks. This is the result I get with the nightly alire in GitHub actions. The reason for the failure is that xmlada's configure script was not run and xmlada_shared.gpr
does not exist yet. The same code runs fine when using alire 1.2.2. https://github.com/jklmnn/gpr-rust/commit/d8a33766a0a14a98e68c99130779ec5e6a7572e4#diff-d0d98998092552a1d3259338c2c71e118a5b8343dd4703c0c7f552ada7f9cb42L111 is the change that makes it work with alire 2.0.
OK, thanks for checking. 2.0
should still run post-fetch
the first time a configuration is build. I'll take a look.
@jklmnn any news about this? I can build xmlada
and ada_language_server
on Windows with the master branch without trouble.
If you have instructions on reproducing this locally please share.
Note that post-fetch
actions aren't run until the first attempt to alr build
a crate, given the new shared dependencies infrastructure. Depending on what you're trying to accomplish, you must take this into account (i.e., post-fetch
is not run right after alr get
or alr with
because until build time we might not know the full configuration of everything).
If you need to ensure artifacts generated by post-fetch
exist and you don't want to run a full build, you'll be able to by using the new features in #1573.
Just found that in 2.0
the post-fetch
action doesn't run after alr update
but it does run after alr build
.
Just found that in
2.0
thepost-fetch
action doesn't run afteralr update
but it does run afteralr build
.
More precisely, post-fetch
runs during the first alr build
and will run again during the next build after an alr update
.
I just tried it in my use case and it seems the problem is solved :+1:.