[opam-devel] [RFC] OPAM files as *the* OCaml package metadata format

Anil Madhavapeddy anil at recoil.org
Wed Apr 13 15:31:42 BST 2016


On 13 Apr 2016, at 15:27, Daniel Bünzli <daniel.buenzli at erratique.ch> wrote:
> 
> Hello,   
> 
> A lot of the things I envision for the gradual simplification of the OCaml build and package eco-system involves using OPAM files as the pivotal package metadata file format (Louis, I really need these x- fields for playing with ideas…)
> 
> Since OCaml packages may also get used outside OPAM itself (e.g. in an os package manager), this means that I need to install opam files so that they can be made available to hypothetical tools that consume them, independently from an OPAM install. The upcoming topkg packager overhaul will do this automatically, unless prevented.  
> 
> However the following questions remain:
> 
> 1. Where should those be installed in `lib:` (like METAs) or `etc:` (seems more logical) or … ?  
> 2. Has this any chance to confuse OPAM itself  ? My guess is no, it treats its install directories elements as sequence of bytes.  

Interesting idea. Do you have any specific consumers in mind for these files?  For example, HomeBrew and MacPorts may both want to run post-upgrade hooks to recompile OPAM packages for depexts that got upgraded.

Comments:
-  The biggest problem I can see is that an individual OPAM file isn't much use without the surrounding repository in which it is evaluated. Where does that sit?
- I think it would be good to encourage the use of an `opam/` directory so that `descr` files can also be tracked with the development version.  We could even assemble useful information in there such as example code fragments that would appear in the OPAM homepage for that package when published. 

-anil


More information about the opam-devel mailing list