[Lazarus] Problem using packages

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Jun 6 12:18:36 CEST 2011


On Mon, 06 Jun 2011 11:50:24 +0200
Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:

> I can add to the list of package problems. Since the new "build modes
> and macros" was introduced, I often make changes to files in packages;
> recompile the project, but the package never detected that a file it
> contains has changed - thus my new binary is not as "new" as I thought.
> And yes, every one of my packages contains _all_ the files that it is
> supposed to manage - that includes include (*.inc) files. This has
> happened quite a lot to me so far. So much so, that I have reverted some
> of my projects to just use unit paths instead of packages (like what was
> done in Delphi IDE). The build process is much more reliable then. My
> other choice is to go back to the previous stable 0.9.28.x Lazarus IDE.
> 
> And to make matters worse, this is with the "stable" 0.9.30.1 Lazarus
> IDE, not the unstable trunk.
> 
> I have tried to debug the issue and see if there is some or other
> reproducable steps to follow... but I am yet to find it. Issues with
> packages so far are quite random - making the frustration even worse.

I know bug reports about compiling too much, not too less.

Can you give more details?

The age is checked in 
packager/packagesystem.pas at the end of function
TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile.
To see what files are checked you can insert the
following line in front of the 
"if FileExistsCached(CurFile.Filename)"

debugln(['TLazPackageGraph.CheckIfPackageNeedsCompilation
CurFile.Filename="',CurFile.Filename,'"
Exists=',FileExistsUTF8(CurFile.Filename),'
NewerThanStateFile=',StateFileAge<FileAgeCached(CurFile.Filename)]);


Mattias




More information about the Lazarus mailing list