caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: Adrien Nader <adrien@notk.org>
Cc: Malcolm Matalka <mmatalka@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Suggested way to determine platform specific capabilities in build system?
Date: Sun, 19 Apr 2015 10:38:27 +0200	[thread overview]
Message-ID: <67E83AEE021C4CF3826AA7A3575C5635@erratique.ch> (raw)
In-Reply-To: <20150419064722.GA25301@notk.org>

Le dimanche, 19 avril 2015 à 08:47, Adrien Nader a écrit :
> This is the wrong approach. Please do not test for systems but for
> capabilities. Testing for systems hinders progress and is a huge
> long-term cost.

It depends quite a lot of what you need to do, e.g. in the ocamlbuild example I linked to, you need to add a specific flag to the compiler, now if you need to check for this using some kind of obscure test your are building quite a few assumptions about how the tool works and the semantics of the flag both of which may change in the future regardless of the you may think about them. These kind of things lead to quite obscure configuration systems which also do have a huge cost both for *users* and maintainers in the long-term.

> The proper way to do it is to test for features instead. Want to know if
> function foo is available in library bar? Well, just reference it and
> see if compilation and/or linking fails.  

I know this is the way autocrap likes to work; it may seem smart but I think that's completely retarded. We want versioned APIs/system releases that are clear about the symbols they expose and their associated semantics. I mean if we take to the extreme why have any form of package constraints in opam ? We could just test needed symbols/modules against what is installed. I hope you do realize that this is completely insane.   

Nowadays that it has never been as easy to use a patched package (under the form of `opam pin`) and that I hope we will also soon fix the problem of making reliable releases in a breeze. I think that the kind of approach you propose is going to be more much more expensive in the long term. The simpler you keep the configuration bits the easier it will be to adapt both from you as a maintainer or from someone that is external to the project.  

The approach you mention would make sense if the OSes would provide us a reliable service for testing its capabilities. Lacking this, relying on obscure and brittle test shell scripts, thanks but no. Progress is not hindered by what you make think...

Best,

Daniel

  reply	other threads:[~2015-04-19  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 10:51 Malcolm Matalka
2015-04-14 11:23 ` Daniel Bünzli
2015-04-14 13:17   ` Thomas Gazagnaire
2015-04-19  6:47   ` Adrien Nader
2015-04-19  8:38     ` Daniel Bünzli [this message]
2015-04-19 10:13       ` David Allsopp
2015-04-19 12:11         ` Daniel Bünzli
2015-04-19 19:14           ` Emmanuel Surleau
2015-04-20  9:55             ` Ben Millwood
2015-04-17 10:38 ` Ivan Gotovchits
2015-04-21 21:36 ` Richard W.M. Jones

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=67E83AEE021C4CF3826AA7A3575C5635@erratique.ch \
    --to=daniel.buenzli@erratique.ch \
    --cc=adrien@notk.org \
    --cc=caml-list@inria.fr \
    --cc=mmatalka@gmail.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).