将文件添加到 DPR 文件与 Delphi 2010 中的项目路径 [英] Adding files to the DPR file vs project paths in Delphi 2010
问题描述
我们刚刚从 D7 迁移到 D2010,并且正在讨论清理项目路径.我们有许多目录,其中包含一些项目路径中包含的大量 Pas 文件,但实际上只有少数文件被任何单个项目使用.
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.
一种选择是完全消除项目路径,只在 dpr 中包含所有使用过的文件.
One option is to eliminate the project paths completely and only have all used files in the dpr.
第二个选项是在 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?
推荐答案
将所有单元明确地放在 dpr 中极大地缩短了编译时间、代码完成、错误洞察和常规导航.
它不会阻止您将文件组织在文件夹和子文件夹中,只是不要依赖不同的路径来查找它们.
在一个拥有数百万 LOC 的大型项目中,它会产生巨大差异.
这篇关于将文件添加到 DPR 文件与 Delphi 2010 中的项目路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!