Just downloaded, no problems so far. Heureka.
There is a problem in the implementation of the new Reduce attribute. The Roman_Number example in RM 4.2.1(15/5ff) does not work. GNAT uses the wrong subtype for the Accum subtype. If's been reported.
Regarding the Windows version: each time I call gprbuild on a project, everything is recompiled, in place of an incremental compilation (normally, only the Ada files that were modified since last build are recompiled). Did anyone else notice that?
Gautier write-only address <gautier_niouzes@hotmail.com> writes:
> Regarding the Windows version: each time I call gprbuild on a project,
> everything is recompiled, in place of an incremental compilation
> (normally, only the Ada files that were modified since last build are
> recompiled). Did anyone else notice that?
I see something similar but different (since 2019); no sources are
recompiled, but everything is linked again, which in my builds is slow.
Assuming you are seeing the same thing, if you keep repeating the same
build, it eventually finishes. If you look in *.bexch, after each build
you will see one more gpr hash added; I gather they should all be added
the first time. So the number of builds needed is the number of *.gpr
you 'with', transitively. After that, each source code change only
requires one build; changes to *.gpr (and some other things?) reset all
the gpr hashes.
I have not reported this to AdaCore; I don't have access to a support
contract for Windows. It would make sense to report it to the community
channel.
--
-- Stephe
Hi Gautier,
Le mercredi 2 juin 2021 à 22:40:04 UTC+2, gautier... a écrit :
> Regarding the Windows version: each time I call gprbuild on a project, everything is recompiled, in place of an incremental compilation (normally, only the Ada files that were modified since last build are recompiled). Did anyone else notice that?
I'm jumping at the end of your battle....
I've observed some small differences in the way compilation options are handled by gprbuild.
In particular the Builder.Default_Switches and Compiler.Default_Switches were the source of a problem
as far as I'm concerned. Not systematic but this resulted in your observed behavior.
From time to time I'm having the problem you mention and in most cases it was
related to some incorrect definition in one of my GNAT project.
When this happens I use one of -vl or -vm option.
And then... I loose a lot of time to spot the issue :-)
Stephane
Le vendredi 11 juin 2021 à 20:59:25 UTC+2, Stephane Carrez a écrit :
> When this happens I use one of -vl or -vm option.
Actually my issue is very similar to one appeared with GNAT GPL 2017 (see "GNAT GPL 2017 incremental compilation").
It is related to configuration pragma files. At the time the solution was to have in the .gpr project file compiler options expressed like
"-gnatec=" & project'Project_Dir & "debug.pra"
because gprbuild doesn't run in the same directory as gnat since the GPL 2017 version.
Now (four GPL/CE versions later) it's a bit trickier since gprbuild doesn't find the configuration pragma file at its correct place, even though gnat does.
The verbosity switch (-vm) was helpful to confirm that (gprbuild shows reasons for recompilation). Thanks for the reminder!
Gautier write-only address <gautier_niouzes@hotmail.com> writes:
> Actually my issue is very similar to one appeared with GNAT GPL 2017
> (see "GNAT GPL 2017 incremental compilation").
> It is related to configuration pragma files. At the time the solution
> was to have in the .gpr project file compiler options expressed like
> "-gnatec=" & project'Project_Dir & "debug.pra"
> because gprbuild doesn't run in the same directory as gnat since the
> GPL 2017 version.
> Now (four GPL/CE versions later) it's a bit trickier since gprbuild
> doesn't find the configuration pragma file at its correct place, even
> though gnat does.
package Builder is
for Global_Configuration_Pragmas use "gnat.adc";
end Builder;
package Compiler is
for Local_Configuration_Pragmas use "gnat_local.adc";
end Compiler;
Gprbuild doesn't complain about finding either of these, which are in
the same directory as the project file (I'm not sure whether they're
actually _actioned_).
Le mercredi 16 juin 2021 à 19:21:48 UTC+2, Simon Wright a écrit : > package Builder is > for Global_Configuration_Pragmas use "gnat.adc"; > end Builder; > > package Compiler is > for Local_Configuration_Pragmas use "gnat_local.adc"; > end Compiler; Perfect - again! Here is the change for HAC's project file: https://github.com/zertovitch/hac/commit/2a26d65 https://sourceforge.net/p/hacadacompiler/code/472/ > Gprbuild doesn't complain about finding either of these, which are in > the same directory as the project file (I'm not sure whether they're > actually _actioned_). With the "-vm" gprbuild option you can see what is passed to the compiler; with the Local_Configuration_Pragmas a corresponding "-gnatec=..." compiler option is added.
Gautier write-only address <gautier_niouzes@hotmail.com> writes:
> Le mercredi 16 juin 2021 à 19:21:48 UTC+2, Simon Wright a écrit :
>
>> package Builder is
>> for Global_Configuration_Pragmas use "gnat.adc";
>> end Builder;
>>
>> package Compiler is
>> for Local_Configuration_Pragmas use "gnat_local.adc";
>> end Compiler;
>>
>> Gprbuild doesn't complain about finding either of these, which are in
>> the same directory as the project file (I'm not sure whether they're
>> actually _actioned_).
>
> With the "-vm" gprbuild option you can see what is passed to the
> compiler; with the Local_Configuration_Pragmas a corresponding
> "-gnatec=..." compiler option is added.
Just checked: both get passed to the compiler.
For info, the global one says
pragma Profile (Ravenscar);
pragma Partition_Elaboration_Policy (Sequential);
while the local one says
pragma Restrictions (No_Recursion);
the reason being that the whole program, which includes Ada Drivers
Library, "needs" the first two (well, not really with Cortex GNAT RTS),
but I'd rather my own code didn't use recursion (ADL needs it because
there's filesystem code in there, which is a natural for it).