[erlang-questions] Non-Erlang dependencies
Benoit Chesneau
bchesneau@REDACTED
Thu Jun 28 10:29:02 CEST 2012
On Thu, Jun 28, 2012 at 10:00 AM, Lo=EFc Hoguin <essen@REDACTED> wrote:
> Hey,
>
> I was wondering how you guys currently handle non-Erlang project
> dependencies, with regards to simple development but also releases handli=
ng.
>
> For example if you are writing a web application you are certainly going =
to
> depend on something like jquery+bootstrap. Do you simply put them in your
> own repos? Can't use rebar for this (yet) but maybe you use a nifty trick=
?
>
Since you want to rely on one specific version of your libs you may
want sometimes to have them in your own repo. Which is generally the
case for such things like jquery and bootstrap. Depending on your
need you can either separate the web part in its own repo or put in
the priv dir of your app or watever. Using the rebar template for a
release you can also move folders in your app.
> Another example would be a C application that you communicate with throug=
h
> ports.
>
Against it depeds. Can the C app be installed with the system? Do you
want to be multiplatform ? Doy you want to distribute all the code in
your archive? At which point could you find these dependencies on the
systems you target ? DO you want to build your application staticaly
against this C code....
Then there are different patterns. Among them:
- Put the c code in c_src and build your prot/nif against it
- Get the C code on build (using curl or other) and build against it
- Build your port against shared libs installed on your system
- wrap your build with a script/program that will build/fetch the
dependencies for you
These days I'm investigating the use of repo [1] wich allows you to
unify different repositories in your project and let you upload
changes to them. (So you keep the repository separation). Difference
with using rebar get-deps is that I can still upload changes in this
repositories directly.
Hope it helps,
- beno=EEt
[1] http://source.android.com/source/version-control.html
More information about the erlang-questions
mailing list