混合语言源目录布局 [英] Mixed language source directory layout

查看:167
本文介绍了混合语言源目录布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在运行一个具有多种不同语言的大型项目:Java,Python,PHP,SQL和Perl。



到目前为止,人们已经在自己的私有存储库中工作,但现在我们要将整个项目合并到单个存储库中。现在的问题是:目录结构应该如何看?我们应该为每种语言分别使用目录,还是应该用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆