Skip to content
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

alr build runs post_fetch action #1235

Open
stephe-ada-guru opened this issue Nov 7, 2022 · 8 comments
Open

alr build runs post_fetch action #1235

stephe-ada-guru opened this issue Nov 7, 2022 · 8 comments
Labels
state: needs info type: broken release A release is unusable due to some kind of brokenness

Comments

@stephe-ada-guru
Copy link

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

@mosteo mosteo added the type: broken release A release is unusable due to some kind of brokenness label Nov 16, 2022
@jklmnn
Copy link

jklmnn commented Dec 1, 2023

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.

@mosteo
Copy link
Member

mosteo commented Dec 1, 2023

@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)

@jklmnn
Copy link

jklmnn commented Dec 1, 2023

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. jklmnn/gpr-rust@d8a3376#diff-d0d98998092552a1d3259338c2c71e118a5b8343dd4703c0c7f552ada7f9cb42L111 is the change that makes it work with alire 2.0.

@mosteo
Copy link
Member

mosteo commented Dec 1, 2023

OK, thanks for checking. 2.0 should still run post-fetch the first time a configuration is build. I'll take a look.

@mosteo
Copy link
Member

mosteo commented Feb 23, 2024

@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.

@rveenker
Copy link

Just found that in 2.0 the post-fetch action doesn't run after alr update but it does run after alr build.

@mosteo
Copy link
Member

mosteo commented Feb 25, 2024

Just found that in 2.0 the post-fetch action doesn't run after alr update but it does run after alr build.

More precisely, post-fetch runs during the first alr build and will run again during the next build after an alr update.

@jklmnn
Copy link

jklmnn commented Mar 29, 2024

I just tried it in my use case and it seems the problem is solved 👍.

jklmnn added a commit to jklmnn/gpr-rust that referenced this issue Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs info type: broken release A release is unusable due to some kind of brokenness
Projects
None yet
Development

No branches or pull requests

4 participants