[opam-devel] Ideas from Node.js

Malcolm Matalka mmatalka at gmail.com
Fri Oct 11 21:26:10 BST 2013


Guillaume Claret <guillaume at claret.me> writes:

> Hello,
>
>   To see if there is room for improvement, I was comparing OPAM with npm (the packages manager of Node.js) which seems to me to be one of
> the most popular packaging system today.
>
>   Instead of three files "descr", "opam" and "url" they have just one "package.json" file.
>
>   They directly use the JSON syntax to describe the packages. The syntax is heavier than the one of "opam" files so the advantage is not
> clear, but this syntax is already known by most programmers / text editors, easily described with a JSON schema and can be parsed by any
> programming language.
>
>   Finally, the "package.json" file is located at the root of the sources of a project. This is a more self-contained approach. Someone can
> even install a package giving the repository Git's url, without registering it on a repository.
>

For a data point, as a heavy use of rebar in Erlang, which puts the package information
with the source, I can say that in my experience, this style does not
scale if you really care about which version of software you use.  We
often have to have a patchset on top of a thirdparty repository to fix
their dependencies.  If we had that information separate from code it
wouldn't be a problem.

While it might be really convenient, my request would be that if OPAM
adopts it, it be easy to override with a package repository.

>   I wonder if these changes could be good ideas for OPAM,
>
> Regards,
> Guillaume Claret
> _______________________________________________
> opam-devel mailing list
> opam-devel at lists.ocaml.org
> http://lists.ocaml.org/listinfo/opam-devel


More information about the opam-devel mailing list