[Lazarus] Identifier not found, but code completion works....

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Feb 22 09:58:41 CET 2011


On Tue, 22 Feb 2011 09:35:09 +0200
Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:

> Op 2011-02-21 22:14, Sven Barth het geskryf:
> > 
> > In our code at work I'm currently often archieving this with Delphi:
> 
> So the problem is not only limited to FPC.
> 
> 
> > plots a nice graph of used units ^^), but compiling a second time
> > usually solves this issue.
> 
> Exactly.... and that means the code is valid syntax (otherwise it would
> never have compiled at all), but the compiler gets confused. The problem
> sits with the compiler, not the code. This is what I was trying to get
> across to Mattias and his example of the Lazarus IDE project. No point
> in recommending all developers changes their style of coding, when the
> issue is in the compiler - not the language. Rather try and fix the
> cause of the problem, not the symptom.

In general you are right.
But I'm afraid, it is not that simple in this case. I know
it is hopeless to tell you, but the bug is known, is hard to
reproduce and as Florian wrote it is a design flaw, so fixing is
very hard and there are other priorities. And even if it is fixed the
fix won't be in the released compiler.
And in the last appearance of the bug the circular unit dependency was
IMHO bad design and is now better solved by a hook. Showing some help
should not require direct access to the help editor. In my experience
circular dependencies are often bad design. In fact the only good reason
for them I know is compatibility.


Mattias




More information about the Lazarus mailing list