caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: Dario Teixeira <dario.teixeira@nleyten.com>, caml-list@inria.fr
Subject: Re: [Caml-list] META file standards for ppx extensions
Date: Fri, 10 Apr 2015 13:25:22 +0200	[thread overview]
Message-ID: <1428665122.22412.39.camel@e130.lan.sumadev.de> (raw)
In-Reply-To: <C55070AB7ACF493F95485F4D225B6DC9@erratique.ch>

[-- Attachment #1: Type: text/plain, Size: 2948 bytes --]

Am Freitag, den 10.04.2015, 01:06 +0200 schrieb Daniel Bünzli:
> Le vendredi, 10 avril 2015 à 00:21, Gerd Stolpmann a écrit :
> > No - you'd need to parse the command and watch out for -pp and -ppx
> > options.
> 
> […]
> > I think the -ppx option is ignored by ocamlc if there is no module
> > source, so ocamlfind doesn't care about it.
> 
> That seems quite brittle and unprecise 

No, it is well-defined.

> and are things that get in the way/you have to consider when you need to debug build systems.

Why is it in the way? In a build system you compile normally module by
module, and separate linking out, but only because you can then specify
the options module by module, or by linking situation. However, ocamlc
already offers a superset of this, and why should ocamlfind restrict
that? It has always been the philosophy of findlib that it supports
everything ocamlc does, and in the same way, i.e. you can turn

ocamlc <options>

always into

ocamlfind ocamlc <options>

only that you have additional options. This philosophy is part of the
success story of findlib, and I won't change that.

> It seems to me that OCaml's build rules are already sufficiently complex so that the tool that is supposed to help us to manage them doesn't introduce more noise in the system.
> 
> More specifically I think that most build system developers out there would agree that having a clear ocamlfind sub-command that allows us to query the *exact* flags a package is supposed to provide us along the well defined phases: pre-processing, compilation and linking in the native and bytecode dimensions would be of great help in general.  

I think you are hunting a ghost animal. The ocamlfind wrapper is fast
enough that you can ignore it, and skipping it will only so minimally
speed up builds that it is not worth doing it.

If you want to develop something in this direction, I'd suggest a
different path, namely a new driver for the ocaml compilers that runs as
a server, and that communicates with the build system over a pipe. Also,
what we can talk about is that ocamlfind functionality is completely
available as library (as of now there is only package lookup in the
library, but not command construction). This would allow it to link it
into your build system, and simply call the functions directly. But as
said, alone this will not be the big accelerator, only in conjunction
with a true compile server.

Gerd

> Would you maybe consider implementing something along these lines ?  
> 
> Best,
> 
> Daniel
> 
> 
> 

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
My OCaml site:          http://www.camlcity.org
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply	other threads:[~2015-04-10 11:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 18:20 Dario Teixeira
2015-04-08 18:59 ` Drup
2015-04-08 19:59   ` Dario Teixeira
2015-04-08 20:37     ` Daniel Bünzli
2015-04-09 10:07       ` Dario Teixeira
2015-04-09 10:56     ` Gerd Stolpmann
2015-04-09 12:24       ` Dario Teixeira
2015-04-09 15:33         ` Daniel Bünzli
2015-04-09 16:45           ` Gerd Stolpmann
2015-04-09 17:27             ` Daniel Bünzli
2015-04-09 18:05               ` Daniel Bünzli
2015-04-09 22:26                 ` Gerd Stolpmann
2015-04-09 22:21               ` Gerd Stolpmann
2015-04-09 23:06                 ` Daniel Bünzli
2015-04-10  8:53                   ` François Bobot
2015-04-10  9:42                     ` Daniel Bünzli
2015-04-10 10:09                       ` Alain Frisch
2015-04-10 11:45                         ` Thomas Gazagnaire
2015-04-10 11:04                       ` François Bobot
2015-04-10 11:55                         ` Daniel Bünzli
2015-04-10 16:33                           ` François Bobot
2015-04-10 17:43                             ` Daniel Bünzli
2015-04-12  6:00                       ` Anil Madhavapeddy
2015-04-10 11:25                   ` Gerd Stolpmann [this message]
2015-04-10 11:55                     ` Daniel Bünzli
2015-04-09 15:45         ` Thomas Gazagnaire
2015-04-09 16:28           ` Dario Teixeira
2015-04-09 16:51             ` Gerd Stolpmann
2015-04-10 12:23         ` Daniel Bünzli
2015-04-10 14:55           ` Gerd Stolpmann

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=1428665122.22412.39.camel@e130.lan.sumadev.de \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    --cc=dario.teixeira@nleyten.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).