caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OPAM conventions
@ 2012-12-12 14:47 Dario Teixeira
  2012-12-12 16:53 ` Markus Mottl
  2012-12-12 17:36 ` Anil Madhavapeddy
  0 siblings, 2 replies; 4+ messages in thread
From: Dario Teixeira @ 2012-12-12 14:47 UTC (permalink / raw)
  To: OCaml mailing-list

Hi,

I've been looking at the OPAM package database -- trying to determine overall
conventions and best practices -- and I came across some inconsistencies.
Though in most cases these are purely cosmetical, I reckon that nevertheless
we could all benefit if some standardisation is agreed upon on.  Examples:

1) Package naming

   For some values of "foo", OPAM's package name for project "ocaml-foo"
   is also "ocaml-foo", whereas for others is simply "foo".  This is an
   ackowledged issue by OPAM developers:
   https://github.com/OCamlPro/opam-repository/issues/163

  In my mind, there are only two sensible policies for naming OPAM packages:

  a) OPAM packages should preserve the name of the original project.
     Thus, if the project is named "ocaml-foo", the OPAM package will
     also be "ocaml-foo".

  b) OPAM packages should have the same name as the findlib entry.
     If project "ocaml-foo" registers itself in findlib with name
     "foo", then "foo" should also be the name of the OPAM package.

   Good arguments can be made for and against each option.  Though this
   is largely a bike-shedding issue, I think the community should make
   a decision sooner rather than later.

2) Invoking executables

   To invoke, say, a configure script, some packages will nonchalantly
   just declare ["./configure"] whereas others will ask the shell to
   do it: ["sh" "configure"].  While either should work in any Unix
   system, should one be preferred for compatibility with more exotic
   systems?

3) Package removal

   For most values of "foo", package "foo" will just declare ["ocamlfind"
   "remove" "foo"].  However, this approach seems a bit brittle to me.
   If the Makefile supports "uninstall" (which is the usually the case
   for OASIS packages), then I reckon that ["%{make}%" "uninstall"]
   should be preferred.

   Having said that, it seems that ["%{make}%" "uninstall"] is currently
   not working (OPAM tries to download the package de novo upon removal!).
   Is this a bug or a feature?

4) Findlib dependency

   Most packages do declare a dependency on ocamlfind.  However, this is
   not universal, even for packages that do register themselves with findlib.
   What should be the standard here: always declare a dependency, or omit
   it altogether since it is implied?

Thank you for your attention!
Best regards,
Dario Teixeira


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-12 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-12 14:47 [Caml-list] OPAM conventions Dario Teixeira
2012-12-12 16:53 ` Markus Mottl
2012-12-12 17:36 ` Anil Madhavapeddy
2012-12-12 18:01   ` Wojciech Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).