alire
alire copied to clipboard
Building with mode flag fails if config gpr file does not exist
If alr build is run with one of the build mode flags, it will fail with the message "unknown project file: "config/*_config"" if the config gpr file does not exist:
$ alr build --release
ⓘ Building orka_numerics/orka_numerics.gpr...
orka_numerics.gpr:1:06: unknown project file: "config/orka_numerics_config"
orka_numerics.gpr:6:60: unknown package or project "Orka_Numerics_Config"
orka_numerics.gpr:31:38: unknown package or project "Orka_Numerics_Config"
orka_numerics.gpr:40:40: unknown package or project "Orka_Numerics_Config"
If I then run alr build without any flag it starts building.
I have also noticed that sometimes it doesn't update the Build_Profile variable or it does but then it doesn't update the Ada_Compiler_Switches.
$ alr build --validation
ⓘ Building orka_numerics/orka_numerics.gpr...
Build finished successfully in 0.42 seconds.
$ alr build --release
ⓘ Building orka_numerics/orka_numerics.gpr...
Build finished successfully in 0.42 seconds.
Right now Build_Profile is "release", but Ada_Compiler_Switches contain "-Og" instead of "-O3".
I'm using following build switches:
[build-switches]
validation.compile_checks = "warnings"
"*".style_checks = ["-gnatygAO-Is"]
(Without it I still get "-Og").
It looks like the logic to detect when to generate the config files is flaky. Thanks for the report.
Should be fixed after #1438. Please reopen if you find otherwise.