From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 134AB7F75C for ; Wed, 10 Sep 2014 21:00:00 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.192.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.192.50 as permitted sender) identity=mailfrom; client-ip=209.85.192.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qg0-f50.google.com) identity=helo; client-ip=209.85.192.50; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-qg0-f50.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8BAAefEFTRVcAym2dsb2JhbABfg2BbgnixIYQskBKBa4dLAYEKCBYQAQEBAQEGCwsJFCqEAwEBAQIBARIGCx0BGxIMAwELBgULDQ0dAgIhAQERAQUBChIGExICDogLAQMJCA2dRmuLMIFygxCIdgoZJwMKZoVyAREBBQ6NEoFCZwuCeYFTBYULBZBphHOCEIFfjR2ESxgpgnmCNSEvgk8BAQE X-IPAS-Result: Aj8BAAefEFTRVcAym2dsb2JhbABfg2BbgnixIYQskBKBa4dLAYEKCBYQAQEBAQEGCwsJFCqEAwEBAQIBARIGCx0BGxIMAwELBgULDQ0dAgIhAQERAQUBChIGExICDogLAQMJCA2dRmuLMIFygxCIdgoZJwMKZoVyAREBBQ6NEoFCZwuCeYFTBYULBZBphHOCEIFfjR2ESxgpgnmCNSEvgk8BAQE X-IronPort-AV: E=Sophos;i="5.04,500,1406584800"; d="scan'208";a="78483245" Received: from mail-qg0-f50.google.com ([209.85.192.50]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Sep 2014 20:59:58 +0200 Received: by mail-qg0-f50.google.com with SMTP id z60so4308957qgd.9 for ; Wed, 10 Sep 2014 11:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=7kZxI81cHIzcAUPi/UCgpgg3SW6vFDCnAslzVj6rPf0=; b=sGAyk2noMuNSvE04VslBcorPC3yjaGKoiKeLmVc8M1Ng8yOK2tomWOCVIuInO5vVYv WJa1n1F9PiaG5zH+rVsiCNpSKcbAGzBr2x0rRWiosCIlEwvu9KMHQPcWF0hawXGgLbqs pjGh1r8TUCmlNpIY5LmcTg6JZaSsyKHQYb0XhonpUI91Ufg23K3dnnQlFLCBsoPurA1z 4qCTpJ9uWVTcM4Oa+uYKpQEyvS182CuTZzgfpHT3a2YQc/vlipKXRkuJpt10VHgfdShw dt4V0ta5UOoiEqnnjd+v/qhCy3ZQNxYkWcokxiIYIrGUviOasfM3eCDmGV2mnfwnhP3C IvWA== X-Received: by 10.140.38.114 with SMTP id s105mr6169871qgs.4.1410375597353; Wed, 10 Sep 2014 11:59:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.174.68 with HTTP; Wed, 10 Sep 2014 11:59:37 -0700 (PDT) In-Reply-To: <54106B6D.4040607@gmail.com> References: <5410522E.3050207@inria.fr> <1410359012.3003.34.camel@thinkpad> <54106B6D.4040607@gmail.com> From: Yotam Barnoy Date: Wed, 10 Sep 2014 14:59:37 -0400 Message-ID: To: Ocaml Mailing List Content-Type: multipart/alternative; boundary=001a11c1303e7b4c3c0502baa810 Subject: Re: [Caml-list] One build system to rule them all? --001a11c1303e7b4c3c0502baa810 Content-Type: text/plain; charset=UTF-8 Here's part of my motivation for starting this discussion now: I recently experienced a hard-drive failure and had to switch to my backup windows laptop. I was dismayed that opam is still not available for Windows, and while wodi is available, it's not nearly as well developed, and apparently requires many hacks for different packages. It seems to me that these hacks are some of the things that make platform compatibility hard for opam. Each build system has different requirements and methods of compilation, and making this approach cross-platform compatible is difficult. Ideally, a build system will abstract away the things that are not inter-platform compatible. This is why I don't like people using makefiles. Makefiles are not available natively on Windows, and they often contain other bits of shell code that isn't available on all POSIX platforms, let alone on Windows. Not to mention the fact that makefiles have a very tricky and sensitive syntax. I don't expect one build system to match everyone's requirements, but I think if we get together, make a list of requirements, and try to get over our personal biases, we can find something that works for most people, and with some group effort, can work for even more people in more use-cases. I'm not suggesting that we invent something new, but that we take something good and make it better, as well as make an effort to learn that tool and convert packages to use that tool. So here are some requirements I can think of (using some of the suggestions that have been brought up): - Easy to use, especially for small projects (large projects can afford to put more time into their build systems) - Abstract away platform considerations as much as possible. No dependence on specific shells and POSIX utilities. - Allows compilation of C files, which is quite common in ocaml packages. - Scalable to many directories and files - Uses ocamlfind to locate packages - Handles camlp4 and ppx - Parallel & incremental compilation About Jenga: I took a quick look at Jenga, and even though I'm impressed by its capabilities, the amount of code needed to be written even for simple projects is overwhelming. It's clearly a very flexible and powerful tool, but I'd say it's too flexible for the mainstream. There's always room for a build system that's integrated into ocaml itself (like Shake), but I think declarative build systems tend to be easier to comprehend for the average user. ocp-build actually looks very interesting. The manual (which is here: http://github.com/OCamlPro/ocp-build/blob/master/docs/user-manual/user-manual.pdf?raw=true) is incomplete, but contains a nice survey of the existing build tools, and motivation for making ocp-build. Has anyone had experience with ocp-build? Opam seems to be using it, but they also use a makefile (why?) with a bunch of shell commands inside (which is precisely the problem from my perspective). ocp-build is supposedly compatible with Windows, too. Yotam On Wed, Sep 10, 2014 at 11:17 AM, Leonardo Laguna Ruiz wrote: > My pick is ocamlbuild because: > > - It works the same way in all platforms that I work (linux,osx, windows > msvc port, cygwin) > - If I can compile ocaml, then I have ocamlbuild > - It does not require external libraries > > I have to say that I feel a little bit annoyed by the fact that some other > build systems or tools, do not work correctly in all the platforms that I > want to support. > > Leonardo > > > > On 9/10/2014 4:23 PM, Gerd Stolpmann wrote: > >> Am Mittwoch, den 10.09.2014, 15:29 +0200 schrieb Francois Berenger: >> >>> More seriously, concerning build systems, we clearly have quite some >>> choice on the OCaml shelf: >>> - obuild >>> - ocamlbuild >>> - omake >>> - oasis (which in fact uses ocamlbuild, don't forget that) >>> >> oasis is not a build system. It is a package description format that >> describes how to invoke the build (and more). So far there is only >> built-in knowledge for ocamlbuild, but this may change, and you can >> already call any external tool, so you can wrap any build system you >> want. The intention is here more to create a uniform API for starting >> the build, which may help packagers and other people who routinely build >> software. >> >> Gerd >> >> - jenga >>> - [...] >>> >>> My preffered is obuild (https://github.com/ocaml-obuild/obuild), >>> for the terseness, readability and centralization of its build >>> descriptions. I would love to see the user community of obuild grow, >>> so that we can get rid of more bugs, be able to compile _any_ >>> OCaml project with it and implement even more cool features >>> (contributors are very welcome). >>> >>> I don't want a ring to rule them all, jut a ring that fits _my_ finger. >>> ;) >>> >>> -- >>> Regards, >>> Francois. >>> >>> > > -- > 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 > --001a11c1303e7b4c3c0502baa810 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Here's part of my motivation for starting this discuss= ion now: I recently experienced a hard-drive failure and had to switch to m= y backup windows laptop. I was dismayed that opam is still not available fo= r Windows, and while wodi is available, it's not nearly as well develop= ed, and apparently requires many hacks for different packages.

It seems to me that these hacks are some of the things that make pla= tform compatibility hard for opam. Each build system has different requirem= ents and methods of compilation, and making this approach cross-platform co= mpatible is difficult. Ideally, a build system will abstract away the thing= s that are not inter-platform compatible. This is why I don't like peop= le using makefiles. Makefiles are not available natively on Windows, and th= ey often contain other bits of shell code that isn't available on all P= OSIX platforms, let alone on Windows. Not to mention the fact that makefile= s have a very tricky and sensitive syntax.

I don&#= 39;t expect one build system to match everyone's requirements, but I th= ink if we get together, make a list of requirements, and try to get over ou= r personal biases, we can find something that works for most people, and wi= th some group effort, can work for even more people in more use-cases. I= 9;m not suggesting that we invent something new, but that we take something= good and make it better, as well as make an effort to learn that tool and = convert packages to use that tool.

So here are som= e requirements I can think of (using some of the suggestions that have been= brought up):
- Easy to use, especially for small projects (large= projects can afford to put more time into their build systems)
- Abstract away platform considerations as much as possible. No dep= endence on specific shells and POSIX utilities.
- Allows co= mpilation of C files, which is quite common in ocaml packages.
- = Scalable to many directories and files
- Uses ocamlfind to locate= packages
- Handles camlp4 and ppx
- Parallel & inc= remental compilation

About Jenga: I took a quick l= ook at Jenga, and even though I'm impressed by its capabilities, the am= ount of code needed to be written even for simple projects is overwhelming.= It's clearly a very flexible and powerful tool, but I'd say it'= ;s too flexible for the mainstream. There's always room for a build sys= tem that's integrated into ocaml itself (like Shake), but I think decla= rative build systems tend to be easier to comprehend for the average user.<= /div>



=
On Wed, Sep 10, 2014 at 11:17 AM, Leonardo Lagun= a Ruiz <modlfo@gmail.com> wrote:
My pick is ocamlbuild because:

- It works the same way in all platforms that I work (linux,osx, windows ms= vc port, cygwin)
- If I can compile ocaml, then I have ocamlbuild
- It does not require external libraries

I have to say that I feel a little bit annoyed by the fact that some other = build systems or tools, do not work correctly in all the platforms that I w= ant to support.

Leonardo



On 9/10/2014 4:23 PM, Gerd Stolpmann wrote:
Am Mittwoch, den 10.09.2014, 15:29 +0200 schrieb Francois Berenger:
More seriously, concerning build systems, we clearly have quite some
choice on the OCaml shelf:
- obuild
- ocamlbuild
- omake
- oasis (which in fact uses ocamlbuild, don't forget that)
oasis is not a build system. It is a package description format that
describes how to invoke the build (and more). So far there is only
built-in knowledge for ocamlbuild, but this may change, and you can
already call any external tool, so you can wrap any build system you
want. The intention is here more to create a uniform API for starting
the build, which may help packagers and other people who routinely build
software.

Gerd

- jenga
- [...]

My preffered is obuild (https://github.com/ocaml-obuild/obuild),
for the terseness, readability and centralization of its build
descriptions. I would love to see the user community of obuild grow,
so that we can get rid of more bugs, be able to compile _any_
OCaml project with it and implement even more cool features
(contributors are very welcome).

I don't want a ring to rule them all, jut a ring that fits _my_ finger.= ;)

--
Regards,
Francois.



--

--001a11c1303e7b4c3c0502baa810--