(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).
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too