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 1FF117FF29 for ; Mon, 11 Jul 2016 11:14:36 +0200 (CEST) IronPort-PHdr: 9a23:lpAfkhxT4FMEwJPXCy+O+j09IxM/srCxBDY+r6Qd0e0QIJqq85mqBkHD//Il1AaPBtSDrakZwLKG+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2WVTerzWI4CIIHV2nbEwud7yzQdOZ15T//tvx0qWbWx9Piju5bOE6BzSNhiKViPMrh5B/IL060BrDrygAUe1XwWR1OQDbxE6ktY+YtaRu+CVIuv8n69UIEeCjJ/x5HvRkC2EDOnop5cujmRTmQA+L4TNIV2wMjhtODwXA4RX+Wb/+tyL7sqx23yzMbuPsSrVhfD2m5KBvTVfNgTsOMz0wuDXSj8VshaZYqTquohV+x8jfZ4TDZ6k2Rb/UYd5PHTkJZc1WTSEUR9rkN4Y= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f51.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=74.125.82.51; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mmatalka@gmail.com designates 74.125.82.51 as permitted sender) identity=mailfrom; client-ip=74.125.82.51; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@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-wm0-f51.google.com) identity=helo; client-ip=74.125.82.51; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-wm0-f51.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AkAQD4YoNXfzNSfUpchBRtD7kXgXokhTo6AoElOhIBAQEBAQEBAREBAQkLCwkfMYIyBAESAYISAQEEARIuARsdAQMBCwYFCw0JJQ8BBA0CEQEFASITGweHcwEDDwgECqI6gTE+MY0lgloFhR8KGScNUoNCAQEBAQEBAQEBAQEBAQEBAQEBARYCBhCEDIILhE2CQx2HPAWYZDSGDYJ6gzUDghOJP4VtiBuGNTCBDyUKgi4cgUxuBYk6AQEB X-IPAS-Result: A0AkAQD4YoNXfzNSfUpchBRtD7kXgXokhTo6AoElOhIBAQEBAQEBAREBAQkLCwkfMYIyBAESAYISAQEEARIuARsdAQMBCwYFCw0JJQ8BBA0CEQEFASITGweHcwEDDwgECqI6gTE+MY0lgloFhR8KGScNUoNCAQEBAQEBAQEBAQEBAQEBAQEBARYCBhCEDIILhE2CQx2HPAWYZDSGDYJ6gzUDghOJP4VtiBuGNTCBDyUKgi4cgUxuBYk6AQEB X-IronPort-AV: E=Sophos;i="5.28,345,1464645600"; d="scan'208";a="184479190" Received: from mail-wm0-f51.google.com ([74.125.82.51]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Jul 2016 11:14:34 +0200 Received: by mail-wm0-f51.google.com with SMTP id o80so41039456wme.1 for ; Mon, 11 Jul 2016 02:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=q8L53+G5qJKaIiZFYGi+RMHZ09Q3NDxBi/zlvsI+vYg=; b=q+GRw9pEwMPjSYbIq6dgsDiKPqHy6ouKL7cJpkCtySUC71tGjAI9arTJip+iT/nv6P 8erw7Q2HZqnl1+6UfyUmqQQLODtNC5F28uED/Wt9Y1f3hm19GhS4KmuZqbyOx0NApNDs XkIpQLh1Sm/MQZfY7UMQ/a3CiVLCbLc7Wzj32UDi9okpxzRaK374yWNxvj9N/2E8j07g VdggyJg3IDJIEc7eF83y2BDvrzHJFpSmqqfk25fEQDhoSa8VFdIJNa+RbtZEo4cmAd2T HKypdCMYAyAOogLrZtDTJ52+ihENVHevX3IdXmH7N+4cya9Ke/1N4A7fBK+5B2bYfihR uUUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=q8L53+G5qJKaIiZFYGi+RMHZ09Q3NDxBi/zlvsI+vYg=; b=ihaM2P+6fAQoBSgSijiktDbFeNIKD3bqj/BHhb/q19ksjhKOoYhcmtlE2CpGGQHb4C gRUl6Os0jgJbYgT75OGJZvkr8phorUobP9nn3gnfup+PoESINsp5mpHFuM2eulWQjsr1 W/AVDPw/5fbhGcq16eJMr0atzIvSekmWRHtyUcWQbr9c3p74Yb2tJcSw/GvqfYD9JJBY 8qGJtfC1/2NnemPrRO1ujuIA6JEv4JkOk0wDlZCQi4bGj5zVJ8LDBv3Ws53NpSO9BPfm J0NaZ6DwWOzInYgvH4dSV5six5pK9EJb/TrzP16N3FcxyJ7sYAJ4hwkinKhDr04nt9ga be3Q== X-Gm-Message-State: ALyK8tIy4UVT/ngYy6dAScuwBYXDec8lsjk/k0Lz4gYPsyppKGSdQ+/KYk90MJtEshrk6g== X-Received: by 10.28.176.7 with SMTP id z7mr17015082wme.17.1468228473614; Mon, 11 Jul 2016 02:14:33 -0700 (PDT) Received: from localhost ([37.153.108.22]) by smtp.gmail.com with ESMTPSA id q203sm4260002wmd.24.2016.07.11.02.14.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jul 2016 02:14:32 -0700 (PDT) From: Malcolm Matalka To: Martin DeMello Cc: "caml-list\@inria.fr" References: <1468148606.25014.58.camel@e130.lan.sumadev.de> Date: Mon, 11 Jul 2016 09:14:31 +0000 In-Reply-To: (Martin DeMello's message of "Sun, 10 Jul 2016 23:15:37 -0700") Message-ID: <86r3b0iljc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] why is building ocaml hard? Martin DeMello writes: > On Sun, Jul 10, 2016 at 4:03 AM, Gerd Stolpmann > wrote: > >> So how to fix this? In my opinion there are two solutions. You can >> either have a more intelligent ocamldep (e.g. one that reads in >> non-local cmi files and uses that information and also tries to >> interpret all project ml files at once and not file by file - btw, did >> anybody check whether there is an algorithm that precisely solves the >> problem?). The other solution path is to mark toplevel modules in the >> syntax of OCaml (e.g. you'd have to do "open ^M2" is M2 is a toplevel >> module). >> > > Would an acceptable third option be to simply record the dag explicitly in > your build file? Working with google's build system [opensourced as bazel: > http://www.bazel.io/] has given me a great appreciation for simply writing > out build dependencies manually; sure, it is relatively tedious to have to > write out the graph yourself rather than have ocamldep figure it out, but > the time and effort to do so is a small fraction of the overall development > time of your project, and the reward is a 100% reliable "detection" of the > build topology. > > martin I've created a build tool called pds (in opam, although a newer version needs to be released) which is meant to be really easy to go from nothing to a compiling project that installs. One problem I found with the various Ocaml build systems was that they were very flexible, which can be nice, but also made them more complicated. I was willing to sacrifice flexibility for simplicity. The README for the current version can be found here: https://bitbucket.org/mimirops/pds/raw/95da73d295d790c82ed900a76880a402b9120b49/README.org I'm sure there are bugs in there, especially the Makefile it generates, but I use it on all of my projects with success. It does rely heavily on ocamldep to come up with the correct order to compile things within a project. /Malcolm