caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Anil Madhavapeddy <anil@recoil.org>
Cc: Markus Mottl <markus.mottl@gmail.com>,
	Thomas Gazagnaire <thomas@ocamlpro.com>,
	 Gerd Stolpmann <info@gerd-stolpmann.de>,
	Fabrice Le Fessant <Fabrice.Le_fessant@inria.fr>,
	 Francois Berenger <berenger@riken.jp>,
	Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] GODI is shutting down
Date: Wed, 24 Jul 2013 19:05:04 +0200	[thread overview]
Message-ID: <CAPFanBHSK=We1cobJS=AX9BsVqUWi52Yg9fR2aaWQmvYwmsgwg@mail.gmail.com> (raw)
In-Reply-To: <7F8931D5-E65D-49EB-B54D-A50716F3EFDD@recoil.org>

> I think that's fair, but the devil is in the details. The core of OASIS
> is sound, but is hampered by its need to build on top of ocamlfind
> and ocamlbuild, and the ensuing impedance mismatches that follow (e.g.
> manually editing _tags files, and trying to debug which tool a failure
> happens in is an advanced operation). OPAM packages represent an output
> collection of (several optionally built) ocamlfind packages, and
> OASIS sits awkwardly in between these two right now, with ocamlbuild
> crashing the party and getting drunk in the kitchen.

While we're at it (and hoping a diversion might restores some
constructiveness in this discussion), I have also been thinking about
this aspect of OASIS that I don't really like. I use ocamlbuild
-use-ocamlfind, but I'd rather build my _tags and myocamlbuild.ml
files completely separately from OASIS, and avoid that intermixing of
several tools. OASIS could decide which files to build (by calling
whichever build system I use with those as targets) and include in the
user installation, but I'd rather have full control of the build
system independently.

In fact, that's more or less what there is in Batteries; we use
ocamlbuild, with a Makefile on top of it (to easily integrate some
hacks such as inline tests using
https://github.com/vincent-hugot/iTeML ), and use the XCustomBuild
option of OASIS to tell it to use the makefile. This avoids having
autogenerated stuff in the ocamlbuild setup, but currently OASIS has
no say on which files to build (it gets what "make all" produces).

In theory, integrating OASIS and the build system would allow OASIS to
diffuse best practices at the build system level as well. In practice
as a package developer I'm not fond on this combination, and I would
rather let a QA pass do the kind of checks to avoid what a tight OASIS
+ build system integration would have made impossible in the first
place (missing .cmt or what not).

PS: ocamlbuild has been getting bugfixes and improvements relatively
fast these last few months, in particular thanks to the completely
benevolous efforts of Wojchiech Meyer. I'm confident it will continue
to improve on the known-problematic fronts (terse documentation,
unfriendly failure behaviours, disappointing parallelization, etc) in
the future, which may help for some of your "fast Mirage" goals.

On Wed, Jul 24, 2013 at 6:39 PM, Anil Madhavapeddy <anil@recoil.org> wrote:
> On 24 Jul 2013, at 08:58, Markus Mottl <markus.mottl@gmail.com> wrote:
>
>> My guess is that you are not totally happy with Oasis at this point so
>> this may be a topic to address.  Being an Oasis user, I would say that
>> the Oasis tools may not be as mature yet as one would hope, but the
>> Cabal-like package specification syntax seems decent enough to be
>> supported by OPAM.  It really shouldn't be that hard to automate the
>> process of updating OPAM metadata (including version constraints)
>> based on changes in Oasis package specifications.
>
> I think that's fair, but the devil is in the details. The core of OASIS
> is sound, but is hampered by its need to build on top of ocamlfind
> and ocamlbuild, and the ensuing impedance mismatches that follow (e.g.
> manually editing _tags files, and trying to debug which tool a failure
> happens in is an advanced operation). OPAM packages represent an output
> collection of (several optionally built) ocamlfind packages, and
> OASIS sits awkwardly in between these two right now, with ocamlbuild
> crashing the party and getting drunk in the kitchen.
>
> OASIS is structured very well to help get around this situation though.
> It has a library that takes care of parsing the _oasis file, and then a
> plugin generator that currently uses ocamlbuild to drive this specification
> into concrete outputs.  Meanwhile, the OCaml compiler has been exposing
> more of its innards via compiler-libs. Leo and I are taking advantage of
> this by trying to folding all of these layers into a new "packaging-friendly"
> OCaml driver that statically links:
>
> - all the camlp4 libraries required for a project, and directly calls it
>   instead of going via -pp (avoiding a fork/marshal).
> - links to OPAM/findlib to find dependencies directly, avoiding a shell
>   out to ocamlfind.
> - can publish a static schedule of its activities to help Makefiles
>   figure out what actually got built (similar to the recent ocamlbuild
>   request).
>
> The idea is to have a "ocamlmkcompiler" that builds a binary for-purpose,
> as "ocamlmktop" does today for toplevels.  It shouldn't even need any
> patches to the official compiler, thanks to compiler-libs.  More to the
> point, it should make it far easier to build a camlp4-aware js_of_ocaml
> toplevel, to fit into the experiments that OCamlPro is doing with web
> IDE interfaces.
>
> Anyway, these are still experiments and quite likely to run into unexpected
> issues as we build them, and we'll have to consider all the alternatives
> before folding them all into OPAM.
>
> Right now, OPAM dictates the *minimal* possible set of requirements for
> a package since it just uses shell commands.  It should be possible to
> specialise this for common cases such as a OASIS library, but it does
> require some careful thought first.  Luckily, we can use OPAM itself to
> conduct such experiments [1].
>
> All such discussions and experiments are very welcome on the mailing
> list (http://lists.ocaml.org/listinfo/opam-devel) to help establish
> everyone's use cases.  Daniel Buenzli's input has been particularly
> interesting to date, as his libraries adopt a very minimal shell-script
> driven approach that doesn't use OASIS, but still distributes META files.
> That's just one example of someone that doesn't use OASIS directly.
> The Core OASIS files are also a bit special due to their configuration
> requirements.  Xen/Mirage is also quite demanding in terms of the
> compilation environment.
>
> Here's my goal: I want to have near instant-rebuilds of Mirage packages.
> I know it's possible to pull this off with the existing compiler tools,
> since the monolithic Mirage tree (with lovingly crafted ocamlbuild rules
> and judicious use of native code compiler binaries) could rebuild the
> entire webserver in ~10s in parallel.  Nowadays, with OPAM, ocamlbuild,
> ocamlfind and camlp4, it takes around 2-3 minutes, which just isn't
> good enough.
>
> -anil
>
> [1] http://opam.ocamlpro.com/pkg/debug-camlp4-log.base.html: I hacked
> up a debug camlp4 to trace all the uses of camlp4 in the OPAM repository,
> during the wg-camlp4 discussion on the topic of where to go next with it.
> This just required doing a mass OPAM install, drinking some coffee, and
> reading the resulting trace logs.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  reply	other threads:[~2013-07-24 17:05 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 21:21 Gerd Stolpmann
2013-07-22 22:32 ` Anil Madhavapeddy
2013-07-23  6:49   ` Gabriel Scherer
2013-07-23  8:46     ` Keyan
2013-07-23  8:57       ` AW: " Gerd Stolpmann
2013-07-23  9:45         ` Paolo Donadeo
2013-07-23 13:31         ` Marek Kubica
2013-07-24  9:09           ` Mihamina Rakotomandimby
2013-07-23  9:34   ` AW: " Gerd Stolpmann
2013-07-23 10:00     ` Jesper Louis Andersen
2013-07-22 23:44 ` oliver
2013-07-23  0:03   ` Nicolas Braud-Santoni
2013-07-23  1:51 ` Francois Berenger
2013-07-24  9:27   ` [Caml-list] " Andreas Hauptmann
2013-07-23  9:07 ` [Caml-list] " Adrien Nader
2013-07-23 10:01   ` AW: " Gerd Stolpmann
2013-07-23 10:22   ` oliver
2013-07-24  1:55   ` Francois Berenger
2013-07-24  7:03     ` Fabrice Le Fessant
2013-07-24  8:42       ` Jun Furuse
2013-07-24 10:30         ` Daniel Bünzli
2013-07-25 14:46           ` [Caml-list] " Sylvain Le Gall
2013-07-24 12:36       ` AW: [Caml-list] " Gerd Stolpmann
2013-07-24 14:44         ` Thomas Gazagnaire
2013-07-24 15:58           ` Markus Mottl
2013-07-24 16:25             ` Thomas Gazagnaire
2013-07-24 16:36               ` Gabriel Scherer
2013-07-24 16:41                 ` Anil Madhavapeddy
2013-07-25 15:21                   ` [Caml-list] " Sylvain Le Gall
2013-07-24 16:39               ` AW: [Caml-list] " Markus Mottl
2013-07-24 16:58                 ` Thomas Gazagnaire
2013-07-24 17:06                   ` Thomas Gazagnaire
2013-07-24 17:33                   ` Török Edwin
2013-07-24 18:49                     ` Markus Mottl
2013-07-25 15:16               ` [Caml-list] Re: AW: " Sylvain Le Gall
2013-07-25 15:29                 ` Leo White
2013-07-25 15:33                   ` Sylvain Le Gall
2013-07-24 16:39             ` [Caml-list] " Anil Madhavapeddy
2013-07-24 17:05               ` Gabriel Scherer [this message]
2013-07-24 17:56                 ` Daniel Bünzli
2013-07-24 18:23                   ` Markus Mottl
2013-07-24 20:43                     ` Daniel Bünzli
2013-07-25  5:32                       ` Adrien Nader
2013-07-25  9:52                         ` Daniel Bünzli
2013-07-25 21:01                           ` Adrien Nader
2013-07-25  1:32                 ` Francois Berenger
2013-07-25 15:10                   ` [Caml-list] " Sylvain Le Gall
2013-07-25 15:23                     ` Christopher Zimmermann
2013-07-25 20:03                       ` Adrien Nader
2013-07-26  1:14                         ` ocamlbuild (was Re: [Caml-list] Re: GODI is shutting down) Francois Berenger
2013-07-26  2:43                           ` Peter Groves
2013-07-26  5:02                           ` Gabriel Scherer
2013-07-26  5:26                             ` [Caml-list] Re: ocamlbuild Francois Berenger
2013-07-26  7:25                               ` Wojciech Meyer
2013-07-26  8:07                                 ` Francois Berenger
2013-07-26  9:24                                   ` r.3
2013-07-26 10:48                                 ` Daniel Bünzli
2013-07-26 11:13                                   ` Wojciech Meyer
2013-07-26 17:29                                     ` Ashish Agarwal
2013-07-26  5:29                             ` ocamlbuild (was Re: [Caml-list] Re: GODI is shutting down) Jeff Meister
2013-07-26  6:14                               ` Gabriel Scherer
2013-07-26 13:48                                 ` Dario Teixeira
2013-07-25 20:18                 ` [Caml-list] GODI is shutting down Wojciech Meyer
2013-07-24 18:04               ` Markus Mottl
2013-07-24 16:18           ` AW: " Matej Kosik
2013-07-24 16:17             ` David Sheets
2013-07-24 16:56               ` Matej Kosik
2013-07-24 17:03                 ` Thomas Gazagnaire
2013-07-25 15:01                   ` [Caml-list] Re: AW: " Sylvain Le Gall
2013-07-24 22:05           ` AW: [Caml-list] " Siraaj Khandkar
2013-07-24 22:06           ` Virgile Prevosto
2013-07-24 22:47             ` Amir Chaudhry
2013-07-24 23:03             ` Anil Madhavapeddy
2013-07-25  5:22               ` Adrien Nader
2013-07-23  9:28 ` [Caml-list] Re: [Godi-list] " Thomas Gazagnaire
2013-07-23 15:32   ` Pierre-Etienne Meunier
2013-07-23 15:37     ` David Sheets
2013-07-23 15:44     ` Daniel Bünzli
2013-07-23 16:19       ` Pierre-Etienne Meunier
2013-07-23 16:26         ` Ashish Agarwal
2013-07-23 16:32         ` Daniel Bünzli
2013-07-23 16:55       ` Virgile Prevosto
2013-07-28 22:29       ` Wojciech Meyer
2013-07-23 19:38     ` Yaron Minsky
2013-07-23 19:49       ` Pierre-Etienne Meunier
2013-07-23 20:02         ` Yaron Minsky
2013-07-23 22:35 ` [Caml-list] " Mike Lin
2013-07-25 16:10 ` [Caml-list] " Sylvain Le Gall
2013-07-25 17:42   ` Daniel Bünzli
2013-07-25 18:52     ` Sylvain Le Gall
2013-07-25 18:28   ` Fabrice Le Fessant
2013-07-25 19:00     ` Sylvain Le Gall
2013-07-25 19:23       ` Yotam Barnoy

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='CAPFanBHSK=We1cobJS=AX9BsVqUWi52Yg9fR2aaWQmvYwmsgwg@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=Fabrice.Le_fessant@inria.fr \
    --cc=anil@recoil.org \
    --cc=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    --cc=markus.mottl@gmail.com \
    --cc=thomas@ocamlpro.com \
    /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;
as well as URLs for NNTP newsgroup(s).