Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Alain Frisch <alain@frisch.fr>
To: Caml mailing list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] [OSR] Ports-like package management system
Date: Tue, 29 Jan 2008 17:00:41 +0100	[thread overview]
Message-ID: <479F4DA9.6070609@frisch.fr> (raw)
In-Reply-To: <479F0664.2070706@exalead.com>

Hello,

It's great to see some discussion and thoughts about package management 
for OCaml software. Of course, various kind of users have different 
expectations. I'm quite happy with GODI as a package developer or 
maintainer or when I need to write small applications that uses external 
OCaml libraries. But I'd like to describe our current approach here at 
LexiFi concerning the use of external libraries. This is the point of 
view a company with a few "big" projects, several developers, and 
several source languages. I guess that many companies that use OCaml 
would face a similar situation.

We develop end-user applications and our main target and development 
platform is Windows (using the native Win32 and Mingw ports of OCaml), 
although we also compile everything under Linux. This unfortunately 
rules out any existing package management system for OCaml. We use a 
number of third-party libraries in OCaml, C, Fortran that come with 
source code and some .Net components that come in binary form.

We don't want to depend on too many external packages to be downloaded 
in order to build our projects. Currently, we only rely on a few tools 
like MS Visual Studio, omake, a Subversion client to be installed on the 
development machines. Everything else is considered part of our project 
tree and kept under the control of Subversion. In particular, we have 
our locally-patched version of OCaml and all the third-party libraries 
(either in source or binary form) in the repository. (Note that our 
membership to the Caml Consortium even allow use to redistribute 
directly this modified version of OCaml.)

Putting everything under the control of SVN has several advantages:

- the developers don't need to do anything special on their computer 
when a new library is installed or updated; we know they all have a 
uniform environment;

- it is trivial to add local patches;

- we have control over the precise version of the libraries we use (we 
cannot afford to depend on any external decision to upgrade a library);

- in particular, various development branches can have different 
versions, and it is trivial to go back in time and build an old version 
with exactly the same libraries as it used to be.

The drawback, of course, is that we need to take care manually of 
upgrading to new versions of external libraries. The OCaml libraries we 
use are quite stable and we rarely find a serious problem that cannot be 
resolved by a small local patch. The only project that we follow 
regularly is OCaml itself. We have a vendor branch in our SVN on which 
we simply copy a current version from INRIA's public CVS; then we merge 
the diffs from this vendor branch into our project.

Another point worth mentioning is that all our project tree, except the 
OCaml part, is managed as a single OMake project. Creating OMakefiles 
for external OCaml/C/Fortan libraries is usually very easy (something 
like 2-3 lines for each library). It is quite comfortable to be able to 
patch, add debug statements, etc in 3rd party components and see the 
changes quickly (without recompiling everything). Another motivation for 
writing our own OMakefiles is that the Makefiles provided in the 
upstream packages are often broken under Windows (which is not 
surprising given how hard it is to deal with Windows path names within a 
Makefile).

We don't use findlib but have recreated a very minimal version of it 
within omake. Although we haven't done it yet, I can imagine something 
more serious: omake functions to read findlib's META files (or something 
similar, maybe in OMake syntax so that they can be simply include'd) so 
that various parts of the project can declare in a simple way which 
OCaml libraries they use and that correct flags can be automatically 
computed and passed to the compilers.

We also use omake to do some local configuration (finding where some 
external tools are, deciding what to compile or not depending on the 
host system, ...), manage local installation, prepare directory 
structures to help installer builders and help manage the list of files 
that should be distributed. We still have some bash/Perl scripts around 
(using Cygwin under Windows), but we should be able to get rid of them 
quite easily (omake has its own scripting language). I believe that 
ocamlbuild is really a great tool but in its current form, it could not 
replace our use of omake. Since we need something like omake anyway, we 
don't see a compelling reason to switch to ocamlbuild and to write 
plugins to compile C#/Fortan/...

We are quite satisfied with the current situation. Things could be 
streamlined if upstream packages came with OMakefiles that could be 
integrated directly in such configurations (that would require some 
conventions to be created and followed). It is really a minor point for 
us, but it could allow to transpose our approach to smaller projects 
where writing OMakefiles by hand is not desirable. Also, I can imagine 
that some scripts could automate the task of downloading, integrating 
and tracking external libraries in a SVN repository, maybe with a nice 
GUI and a central list of  packages (a la GODI). Note that almost 
nothing here is really OCaml-specific (except maybe some omake functions 
/ conventions to emulate findlib).

-- Alain


  parent reply	other threads:[~2008-01-29 16:00 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-29 10:56 Berke Durak
2008-01-29 11:12 ` [Caml-list] " David Teller
2008-01-29 13:11 ` Yaron Minsky
2008-01-29 14:04   ` Nicolas Pouillard
2008-01-29 17:35   ` Berke Durak
2008-01-29 18:02     ` Bünzli Daniel
2008-01-29 18:10     ` Paul Pelzl
2008-01-29 22:26     ` Paolo Donadeo
2008-01-30  1:55       ` Bünzli Daniel
2008-01-29 22:46     ` Paolo Donadeo
2008-01-29 13:47 ` Yaron Minsky
2008-01-29 14:04   ` Nicolas Pouillard
2008-01-29 16:00 ` Alain Frisch [this message]
2008-01-30  6:58   ` Yaron Minsky
2008-01-30  8:56     ` Nicolas Pouillard
2008-01-29 17:56 ` Bünzli Daniel
2008-01-29 18:17   ` Nicolas Pouillard
2008-01-29 19:13     ` Bünzli Daniel
2008-01-30  8:49       ` Nicolas Pouillard
2008-01-30 11:15         ` Bünzli Daniel
2008-01-30 11:52           ` Nicolas Pouillard
2008-01-29 18:47 ` Hezekiah M. Carty
2008-01-30  9:06 ` Sylvain Le Gall
2008-01-30  9:39   ` [Caml-list] " Berke Durak
2008-01-30  9:53     ` Sylvain Le Gall
2008-01-30 10:50       ` [Caml-list] " Nicolas Pouillard
2008-01-30 11:15         ` Bünzli Daniel
2008-01-30 11:54           ` Nicolas Pouillard
2008-01-30 13:58             ` Sylvain Le Gall
2008-01-30 14:08               ` [Caml-list] " Nicolas Pouillard
2008-01-30 11:15       ` Berke Durak
2008-01-30 11:47         ` Bünzli Daniel
2008-01-30 13:55           ` Sylvain Le Gall
2008-01-30 13:54         ` Sylvain Le Gall
2008-01-30 14:24           ` [Caml-list] " Berke Durak
2008-01-30 14:35             ` Sylvain Le Gall
2008-01-30 19:48             ` [Caml-list] " Bünzli Daniel
2008-01-30 18:12           ` Vlad Skvortsov
2008-01-30 16:32       ` Michael Ekstrand
2008-01-30 16:44         ` Sylvain Le Gall
2008-01-30 18:03         ` [Caml-list] " Nicolas Pouillard
2008-01-30 19:45         ` Olivier Andrieu
2008-01-30 19:53           ` Vlad Skvortsov
2008-01-30 10:45     ` Sylvain Le Gall
2008-01-30  9:51   ` [Caml-list] " Jon Harrop
2008-01-30 10:18     ` Sylvain Le Gall
2008-01-30 10:43       ` [Caml-list] " Jon Harrop
2008-01-30 12:00         ` Nicolas Pouillard
2008-01-30 13:25           ` Jon Harrop
2008-01-30 14:06             ` Nicolas Pouillard
2008-01-30 12:37   ` Pietro Abate
2008-01-30 13:26     ` Stefano Zacchiroli
2008-01-30 14:07     ` Gerd Stolpmann
2008-01-30 13:37       ` Stefano Zacchiroli
2008-01-30 15:12         ` Gerd Stolpmann
2008-01-31  9:02           ` Stefano Zacchiroli
2008-02-01 15:03             ` Gerd Stolpmann
2008-02-03 20:21               ` Stefano Zacchiroli
2008-02-04  3:40                 ` Matthew Hannigan
2008-02-04 18:42               ` Nathaniel Gray
2008-01-30 17:42       ` David Allsopp
2008-01-30 14:13     ` Sylvain Le Gall
2008-01-30 20:22       ` [Caml-list] " Bünzli Daniel
2008-02-08 22:24       ` N. Owen Gunden
2008-01-30 15:15     ` Jon Harrop
2008-01-30 12:37 ` [Caml-list] " Berke Durak
2008-02-13  8:45 ` David Teller
2008-02-13 10:02   ` Sylvain Le Gall
2008-02-13 10:48     ` [Caml-list] " Berke Durak
2008-02-13 13:51       ` Sylvain Le Gall
2008-02-13 14:10       ` [Caml-list] " Richard Jones
2008-02-13 14:22         ` Sylvain Le Gall
2008-02-13 17:57           ` [Caml-list] " Richard Jones
2008-02-15  8:13       ` Maxence Guesdon
2008-02-15  9:47         ` Berke Durak
2008-02-15 10:24           ` Maxence Guesdon
2008-02-15 10:59             ` Stefano Zacchiroli
2008-02-15 15:45               ` Maxence Guesdon
2008-02-15 13:35         ` Ralph Douglass
2008-02-15 14:08           ` Christophe TROESTLER
2008-02-13 12:13     ` David Teller
2008-02-13 13:48       ` Sylvain Le Gall
2008-02-13 13:58         ` [Caml-list] " David Teller
2008-02-13 14:20           ` Sylvain Le Gall
2008-02-13 14:28             ` [Caml-list] " David Teller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=479F4DA9.6070609@frisch.fr \
    --to=alain@frisch.fr \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox