delphidelphi-2010

Adding files to the DPR file vs project paths in Delphi 2010


We are just migrating from D7 to D2010 and are having a debate about cleaning up the project paths. We have a number of directories with a large number of Pas files that are included on some project paths, but only a few of the files are actually used by any single project.

One option is to eliminate the project paths completely and only have all used files in the dpr.

The second option is to keep only the needed files in the dpr and have project paths to the directories for the rest of the files.

Is there any argument for one option over the other?


Solution

  • Having all your units explicitly in the dpr immensely improves compilation time, code completion, error insight and general navigation.
    It does not prevent you from keeping your files organized in folders and sub-folders, but just don't rely on the different paths to find them.
    On a big project with millions LOC, it makes a huge difference.