I've been putting the path to the unit (.pas) file folders of our packages into the Delphi Library path but I'm beginning to wonder if this is a mistake! Take this problem for an example:
I have two home grown packages:
HighLevelPackage uses units contained in LowLevelPackage.
If the path to both package's unit folders are in the library path then there is the chance of me building HighLevelPackage before LowLevelPackage and HighLevelPackage will implicitedly contain LowLevelPackage's units (i think?).
I'm wondering if instead I should be putting the path to the DCUs of these packages into the Library Path. And maybe putting the path to the actual source units in the Browsing Path so we can still step into them when debugging.
Does that sound right? What should really be going into the Library Path? Paths to .DCUs? .DCPs? .BPLs? or .PASs?
Library Path: *.dcu, *.inc, *.dfm
Package Output: *.bpl
Dcp Output: *.dcp
Browsing Path: *.pas
Hmmm, I just had a look at Delphi Help's word on library path:
Library Path Specifies search paths where compiler can find the source files for the package. The compiler can find only those files listed in the library path. If you try to build your package with a file not on the library path, you will receive a compiler error.
I'm not sure I agree with this as it means every package can see every other package's source units so if one package used another packages units and you built them out of order I believe there's potential for dependencies getting screwed up. Oh well, who am I to question Delphi Help, lol. ;)
I usually don't put any package sources into the library path at all. This is because all the 3rd party libraries a project uses go into a subdirectory (svn:external) of the project, so having them in the library path would result in the wrong sources being added to a project. Instead I add the relative paths to the project's search path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With