是否有在搜索路径中放置钢筋的约定?

发布于 2024-11-28 05:56:13 字数 358 浏览 0 评论 0原文

我试图了解如何使用 Rebar 构建多应用程序 Erlang OTP 版本。

我的应用程序包括 Webmachine、Riak 和一些我自己设计的应用程序。到目前为止,我已经在应用程序根目录中成功运行了Rebar。但 Rebar 引导程序表明可能有更好的方法。例如:

“您现在有一个名为“rebar”的独立脚本 您当前的工作目录。将此脚本放置在路径中的任意位置 你可以使用 rebar 来构建符合 OTP 标准的应用程序。”

我可以想到几种方法来做到这一点。但我想知道:

是否有一个首选约定:例如,将 Rebar 放在 .erlang 文件中,/usr/local /bin 等等?

非常感谢,

LRP

I'm attempting to understand how to build a multiple-application Erlang OTP release using Rebar.

My applications include Webmachine, Riak, and a few applications of my own devising. So far, I have been running Rebar successfully in the application root directory. But the Rebar bootstrap program suggests that there may be a better way. E.g.:

"You now have a self-contained script called "rebar" in
your current working directory. Place this script anywhere in your path
and you can use rebar to build OTP-compliant apps."

I can think of several ways to do this. But I'm wondering:

Is there is a preferred convention: e.g., placing Rebar in an .erlang file, /usr/local/bin, etc., etc.?

Many thanks,

LRP

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

影子是时光的心 2024-12-05 05:56:13

我在 /usr/local/bin 中保存了一个副本,我在创建新应用程序时使用它。例如:

$ rebar create-app appid=myapp

我的所有项目都是使用 rebar 构建的,方法是将二进制文件放置在项目的根目录中,并在 Makefile 中本地引用它,如下所示 此处。截至撰写本文时,这似乎是社区已采用的惯例。例如,mochiwebibrowseerlydtl 都是这样构建的。

就我个人而言,我不太喜欢在每个项目中都包含 rebar 二进制文件,但我没有看到一个好的替代方案。对于那些路径中没有钢筋或路径中没有更新版本的人来说,它使生活变得更轻松。

我怀疑这是暂时的情况。最终,rebar 项目将开始减少提交,我们都同意在我们的路径中保留一个副本。到那时我们就可以停止包含它了。当然,如果您的项目仅供您使用,那么这不是问题。

I keep a copy in /usr/local/bin, which I use when creating new apps. For example:

$ rebar create-app appid=myapp

All of my projects are built with rebar by placing the binary in the root directory of my project and referencing it locally in my Makefile as seen here. As of this writing, this seems to be the convention the community has adopted. For example, nitrogen, mochiweb, ibrowse, and erlydtl are all built this way.

Personally, I'm not a big fan of including the rebar binary with every project but I don't see a good alternative. It makes life easier for people that either don't have rebar in their path, or don't have an updated version in their path.

I suspect this is a temporary situation. Eventually the rebar project will start to have fewer commits, and we'll all agree to keep a copy in our path. At that point we can all stop including it. Of course, if your projects are only going to be used by you, this is a non-issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文