混合语言源目录布局 [英] Mixed language source directory layout
问题描述
到目前为止,人们已经在自己的私有存储库中工作,但现在我们要将整个项目合并到单个存储库中。现在的问题是:目录结构应该如何看?我们应该为每种语言分别使用目录,还是应该用component / project分隔? python / perl / java应用于通用目录布局的程度如何?
我的经验表明,这种布局最好:
mylib /
src /
java /
python /
perl /
... /
bin /
java /
python /
perl /
stage /
dist /
src
是您的来源,是唯一签入的。
bin
是在构建过程中发生编译的地方,并且没有签入。
舞台
是您在制作过程中复制东西以准备包装的地方。
dist
是放置构建工件的位置
我把模块/组件/库放在顶部的层次结构,因为我单独构建每个模块,并使用依赖管理器根据需要进行组合。
当然,命名约定有所不同。但是我发现这个工作相当令人满意。
We are running a large project with several different languages: Java, Python, PHP, SQL and Perl.
Until now people have been working in their own private repositories, but now we want to merge the entire project in a single repository. The question now is: how should the directory structure look? Should we have separate directories for each language, or should we separate it by component/project? How well does python/perl/java cope with a common directory layout?
My experience indicates that this kind of layout is best:
mylib/
src/
java/
python/
perl/
.../
bin/
java/
python/
perl/
stage/
dist/
src
is your source, and is the only thing checked in.
bin
is where "compilation" occurs to during the build, and is not checked in.
stage
is where you copy things during the build to prepare them for packaging
dist
is where you put the build artifacts
I put the module/component/library at the top of the hierarchy, because I build every module separately, and use a dependency manager to combine them as needed.
Of course, naming conventions vary. But I've found this to work quite satisfactorily.
这篇关于混合语言源目录布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!