On Sat, 18 Mar 2006 13:32:46 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:

> On 18/03/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > So, the bug is that '../../Core' is not expanded relative to the .lpk.
> > I will take a look.
> 
> Thanks.
> 
> > BTW, it is a bad idea to share source paths. For example if FPC needs to
> > rebuild a source it will put the .ppu to various places on your disk.
> > Better share only .ppu directories.
> 
> I did think of that, but then I can't use Ctrl+<click> navigation on
> any units in the package.  This is how I spotted the problem.  In my
> example, the tiOPF package is huge and often need to reference/view
> the source to find methods, etc.
> 
> Is there another way I can still use Ctrl+<click> without sharing
> source paths (using packages)?

Maybe I was a little imprecise.
There is a UnitPath and a SrcPath. The UnitPath is given to the compiler.
The SrcPath is an extra information for the IDE, that means the IDE uses
UnitPath _and_ SrcPath to find units.

And then there are the CompiledSrcPaths. 
For example: 
A package pkg1 has its .pas directories (.;src1/;src2/) and one output
directory (units/) for the .ppu.
For pkg1 the UnitPath is .;src1;src2 and the SrcPath is empty.
That means, the IDE defines for the directories '.', 'src1' and 'src2' the
UnitPath '/path/to/pkg1;/path/to/pkg1/src1;/path/to/pkg1/src2'.
And it defines for the output directory '/path/to/pkg1/units' the
CompiledSrcPath /path/to/pkg1;/path/to/pkg1/src1;/path/to/pkg1/src2.

EVery project or package using pkg1, inherites the UnitPath addition
'/path/to/pkg1/units' - the output directory of pkg1.
When codetools searches a unit, it looks up for every directory in the
UnitPath, if there is a CompiledSrcPath.
It then adds the CompiledSrcPath to the current SrcPath.

This system keeps the shown paths in the compiler options small and the user
don't need to worry about SrcPath.
Formerly the CompiledSrcPath was only added, if the codetools find a .ppu in
the directory. So, the IDE failed just as FPC would have failed. I guess,
that's what you spotted, misinterpreted and why you extended the search
paths.
That's why I decided to change that, and because I rewrote this week the
unit search methods in the codetools and committed it some hours ago, the
IDE will now find more sources.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to