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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id DB2497F6CC for ; Fri, 6 Feb 2015 18:01:06 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dario.teixeira@nleyten.com) identity=pra; client-ip=217.70.183.197; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dario.teixeira@nleyten.com"; x-sender="dario.teixeira@nleyten.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of dario.teixeira@nleyten.com) identity=mailfrom; client-ip=217.70.183.197; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dario.teixeira@nleyten.com"; x-sender="dario.teixeira@nleyten.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@relay5-d.mail.gandi.net) identity=helo; client-ip=217.70.183.197; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dario.teixeira@nleyten.com"; x-sender="postmaster@relay5-d.mail.gandi.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BQAQDn8tRUnMW3Rtlag1haBIJ9v2GFcQKBGUMBAQEBAREBAQEBAQYNCQkULoQNAQUjFVEEBxoCJgICVyETiBYJv16WGQEBCAEBAQEBHYEhjl4WglKBQQWSaphGAoQQb4FEfgEBAQ X-IPAS-Result: A0BQAQDn8tRUnMW3Rtlag1haBIJ9v2GFcQKBGUMBAQEBAREBAQEBAQYNCQkULoQNAQUjFVEEBxoCJgICVyETiBYJv16WGQEBCAEBAQEBHYEhjl4WglKBQQWSaphGAoQQb4FEfgEBAQ X-IronPort-AV: E=Sophos;i="5.09,530,1418079600"; d="scan'208";a="120620753" Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 06 Feb 2015 18:01:06 +0100 Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 0FEAC41C08F for ; Fri, 6 Feb 2015 18:01:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id NyLQW7HZUVKm for ; Fri, 6 Feb 2015 18:01:04 +0100 (CET) X-Originating-IP: 10.58.1.142 Received: from webmail.gandi.net (unknown [10.58.1.142]) (Authenticated sender: dario.teixeira@nleyten.com) by relay5-d.mail.gandi.net (Postfix) with ESMTPA id 9A2E441C0A7 for ; Fri, 6 Feb 2015 18:01:04 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 06 Feb 2015 17:01:04 +0000 From: Dario Teixeira To: caml-list@inria.fr In-Reply-To: References: <7bca26c097b73f653bd8bbfa1a07eaa8@nleyten.com> <20150123164111.GA16664@yquem.inria.fr> <0fd907ee06bedeff816160b9e7b9c027@nleyten.com> <6829d3482c94fbe2e22dd1574618e86e@nleyten.com> <5c76729753733a2ccbf1cad96879c312@nleyten.com> <1ee7eec964558b9bcb4f0d5650449440@nleyten.com> Message-ID: <5f5c603d077133e065b82db1eed43935@nleyten.com> X-Sender: dario.teixeira@nleyten.com User-Agent: Roundcube Webmail/0.9.5 Subject: Re: [Caml-list] Forcing OCamlbuild to compile a file before another Hi, Still on the subject of getting module aliases and -no-alias-deps to work with OASIS and OCamlbuild: I've created a repo on Github for Libfoobar [1], the dummy example I've been using to test and play with this problem. As you can see, I've opted to postprocess the output of OCamldep outside the OCamlbuild plugin. Essentially, I set the Options.ocamldep to call myocamldep.ml, an OCaml script that serves as frontend to OCamldep and does the actual postprocessing. Note that there is project-specific knowledge in myocamldep.ml: there is a dictionary 'dict' mapping between the module alias files (foo.ml and bar.ml) and the aliases declared in each one. This is the same information that should be contained in an mlalias file. In addition, the script makes some assumptions regarding the naming of modules. Though obviously this solution is far from optimal, this being just a stop-gap measure it will do for now. I've come across a snag which puts some doubt on the hope that this could all be implementable without touching OCamldep itself. Consider the Bar_a module. It should depend on Bar, Foo, and Foo_a. However, OCamldep reports its dependencies as only Bar and Foo. The missing dependency on Foo.A is not considered, which of course makes sense, but it's not what I was hoping for! Kind regards, Dario Teixeira [1] https://github.com/darioteixeira/libfoobar