[Lazarus] IDE trunk cannot build on fpc 3.0.2

Juha Manninen juha.manninen62 at gmail.com
Fri Mar 20 12:05:10 CET 2020


On Thu, Mar 19, 2020 at 10:11 AM Ondrej Pokorny via lazarus <
lazarus at lists.lazarus-ide.org> wrote:

> Well, generics may cause an internal error on a simple compile. A clean
> rebuild is needed to compile even after a small change.
>

It may be true when a generics class definition changes. Typically they
don't change often.

This happens a lot for me now. Sometimes in the changes from r62639,
> sometimes in different code. If I work on the source of the Lazarus IDE and
> I recompile it, I get an internal error. Then I have to rebuild Lazarus IDE
> clean, which takes a lot of time.
>
r62639 required a clean compile also because the container class was moved
to LazUtils. Other containers are already there.
If the old .ppu remains in its old place, it causes an incompatible ppu
error.
An internal error happens because of a bug in FPC. I also get them a lot
but I didn't notice any connection to generics. The error comes in
unexpected places, not related to changes I made. Usually no generics are
used there.
I am also worried when the FPC bug or bugs get fixed. It is not a new thing
and it may have gotten worse. There are bug reports like:
 https://bugs.freepascal.org/view.php?id=33087

It is really frustrating when this happens every 10 minutes :/ I really
> don't see a point to change working code to generics.
>
Please don't blame my refactoring if it happens every 10 minutes. It was a
one-time shot.
The change was related to a substantial new feature for the package system
provided by Sven Barth.
See issues :
 https://bugs.freepascal.org/view.php?id=36654
 https://bugs.freepascal.org/view.php?id=36734
Generics make a lot of sense in containers bringing type checking and
safety also there. The code becomes more self-documenting as well.
In this particular case the container usage was not obvious. The Pointer ->
Pointer container was used in 2 different ways in the same unit, now
specialized as TPackagePackageArray and TOwnerPackageArray.
Unit ObjectLists is now used only in unit PkgManager but it looks like a
useful container and deserves to be in LazUtils.

Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20200320/af4d637e/attachment.html>


More information about the lazarus mailing list