Here is part 1 again.  I think Lazarus mailing list rejected part 1
for being to big. It would be nice if the mailing list could notify us
if that happens!

Also instead of sending a image of the uses clause of my .lpr file, in
included it here
as text.

-------------- cut ----------------
uses
 {$IFDEF UNIX}{$IFDEF UseCThreads}
 cthreads,
 {$ENDIF}{$ENDIF}
 Interfaces    // this includes the LCL widgetset
 ,Forms
 ,GuiTestRunner
 ,tiLog
 ,tiLogReg
 ,tiOIDGUID     // registers GUID's as OIDs
 ,tiQueryFBL
 ,M2Application
 ,M2Browser
 ,Model
 ,Visitors
 ,SlideParser
 ,m2TestFramework
 ,CentreTests
 ,Language_test
 ,M2Browser_test
 ,SlideParser_test
 ,NodeData_test
 ,Levels_test
 ,module_test
 ,ModuleFlyweightFactory_test
 ,Learner_test
 ,TreeBuildVisitorHTML_test
 ,SystemParameter_test
 ,CsvParser_Tests
 ,Views_test
 ;

-------------  end  ---------------

Graeme.



---------- Forwarded message ----------
From: Graeme Geldenhuys <[EMAIL PROTECTED]>
Date: Jan 12, 2007 9:41 AM
Subject: Messages window showing wrong unit with error (part 1)
To: [email protected]


Hi,

I have noticed a while back that the Lazarus Messages window doesn't
show the correct unit when referring to a compiler error. The line
number and column number is correct, but the unit isn't.

Now I'm not sure if this is Lazarus (latest svn) or FPC 2.1.1 (lastest
svn).  I tend to update both once a week at the same time.  I'm
running on Linux x86.  I haven't updated or changed GDB in the last
year so I don't believe it is GDB.

To try and give you an example.  The Lazarus Messages window will show
a unit and line number with error.  If I click on that error it takes
me to that unit, but the error position might be in a comment block or
a part in a unit that doesn't even contain code.  I have been trying
to figure out a pattern. It seems that the unit that actually has the
problem is the one that appears infront of the unit Lazarus mentioned
in some uses clause. Normally the .lpr file for small projects, but
this is a problem for larger project where all units are not mentioned
in the .lpr file.

See attached screenshots for an example. (I split the screenshots over
two emails)

Notice the unit mentioned in the Messages window.  Also notice the
cursor position in the editor.  The mentioned unit is wrong, but the
position is correct. Also notice the order of the units in the uses
clause. The problem was in "NodeData_test", but Lazarus mentioned
"SlideParser_test" which occurs before "NodeData_test" in the uses
clause.

Luckily I compile often, so the problem unit is normally open in my
editor so is easy to find.

Anybody else experiencing this?  This problem doesn't occur 100% of
the time but I would guess around 70% of the time.


--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'

Attachment: wrong_unit.png
Description: PNG image

Reply via email to