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

Rebuilding crates that should be cached #1798

Open
simonjwright opened this issue Nov 22, 2024 · 3 comments
Open

Rebuilding crates that should be cached #1798

simonjwright opened this issue Nov 22, 2024 · 3 comments
Labels
type: bug Something isn't working
Milestone

Comments

@simonjwright
Copy link
Contributor

(This is in response to @mosteo’s request on StackOverflow, hope this is a good place)

Some crates get rebuilt when the using project is rebuilt in spite of using the same compiler/settings etc.

For me (Macbook Air, M1, Sequoia 15.1.1, alr’s gnat_native 14.2.1), using my local gprbuild 25.0.0 I don’t get the problem: once built, it’s built.

Using alr’s gprbuild 24.0.1, however, it does get rebuilt.

I tried rebuilding a single file:

$ alr build -- -c -u -vh langkit_support-generic_api-introspection.adb
...
  -> "/users/simon/.local/share/alire/builds/langkit_support_25.0.1_f7e331c4/6b4639c6fe8816e08cf64ccda8b22a6f35e87a1014f49a0e1aa60b7234034289/langkit/support/gnat.adc" not defined in project and -gnatec= command line option
Warning: Dependency file "/Users/simon/.local/share/alire/builds/langkit_support_25.0.1_f7e331c4/6b4639c6fe8816e08cf64ccda8b22a6f35e87a1014f49a0e1aa60b7234034289/langkit/support/obj/dev/langkit_support-generic_api-introspection.ali" contains outdated information about configuration file. 
Warning: Consider using the -gnateb switch if supported by the compiler.
Changing to object directory of "Langkit_Support": "/Users/simon/.local/share/alire/builds/langkit_support_25.0.1_f7e331c4/6b4639c6fe8816e08cf64ccda8b22a6f35e87a1014f49a0e1aa60b7234034289/langkit/support/obj/dev/"
Creating temp file "/private/var/folders/_q/fvnxz46903z9hjh38fz0lyhm0000gs/T/GPR.68551/GNAT-TEMP-000003.TMP"
/Users/simon/.local/share/alire/toolchains/gnat_native_14.2.1_cc5517d6/bin/gcc -c
...

I couldn’t work out what the "outdated information about configuration file" might be, so wondered if it might be the missing gnat.adc (near the top).

Edit that in the release, delete the cache, start again: now it doesn’t rebuild.

I haven’t tried this with my locally-built gprbuild 24.0.1 (I don’t remember what made me up the version), but it looks as though it’s something that got fixed in 25; worth making a release?

(PS, looks as though libadalang has the same issue).

@mosteo
Copy link
Member

mosteo commented Nov 25, 2024

Thanks, Simon. I've also got reports of unexpected rebuilds of gtkada, on Linux but not on Windows.

@mosteo mosteo added the type: bug Something isn't working label Nov 25, 2024
@mosteo mosteo added this to the 2.1 milestone Nov 25, 2024
@mosteo
Copy link
Member

mosteo commented Nov 25, 2024

(Pinging @Fabien-Chouteau so he is aware of the issue, as this may go beyond Alire itself.)

@Fabien-Chouteau
Copy link
Member

Doesn't look like and Alire issue, probably gprbuild indeed. I don't have the time to work on a gprbuild 25 release at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants