On Sat, 02 Feb 2013 19:00:17 +0000 Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote:
> Mattias Gaertner wrote: > > On Sat, 02 Feb 2013 15:37:51 +0000 > > Mark Morgan Lloyd <markmll.laza...@telemetry.co.uk> wrote: > > > >> [...] > >>>> /usr/local/src/inifiles > >>>> /usr/local/src/inifiles/trunk > >>>> > >>>> /usr/local/src/heavywethers > >>>> /usr/local/src/heavywethers/trunk > >>>> /usr/local/src/heavywethers/inifiles -> /usr/local/src/inifiles > >>>> > >>>> with the project only referring to ../inifiles/trunk: > >>>> > >>>> <SearchPaths> > >>>> <IncludeFiles Value="$(ProjOutDir);$(LazarusDir)\ide"/> > >>>> <OtherUnitFiles Value="..\inifiles\trunk"/> > >>>> </SearchPaths> > >>> The relative path "../inifiles/trunk" is passed absolute to the > >>> compiler. If for example your project directory > >>> is /usr/local/src/heavywethers/trunk the IDE passes > >>> -Fu/usr/local/src/heavywethers/inifiles/trunk > >>> to the compiler. > >> Which presumably means that if there's an error the compiler reports the > >> absolute path, and the IDE doesn't realise that it's already got that > >> file open. > > > > 1. Why should the compiler report a wrong path? > > That's not quite what I said. You pointed out that the IDE was > converting the relative path to an absolute one which is what the > compiler sees, the compiler reports an absolute path in any error > message, and by the time it sees that the IDE's forgotten that it's > already got the file open. Sorry. You lost me. > > 2. The files' inode may be the same, but for all other purposes they > > are two different files. > > In the case of a symlink- arguable. But I think the case you've pointed > out is purely to do with the absolute/relative path to a file, and in > that case it's definitely the same file. For all searches the IDE must handle them as two different files, because of the concept of relative (search-) paths. Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus