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 32F157F6CC for ; Wed, 4 Feb 2015 14:17:14 +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.195; 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.195; 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@relay3-d.mail.gandi.net) identity=helo; client-ip=217.70.183.195; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="dario.teixeira@nleyten.com"; x-sender="postmaster@relay3-d.mail.gandi.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AlAQDIGtJUnMO3RtlahDWCfcUpAoEUQwEBAQEBEQEBAQEBBg0JCRQuhA0BBAEjFUYLBAcaAiYCAlchiB0Mv0uWXQwggSGOXhaCUoFBBZlJjguDOwKEEIIzfgEBAQ X-IPAS-Result: A0AlAQDIGtJUnMO3RtlahDWCfcUpAoEUQwEBAQEBEQEBAQEBBg0JCRQuhA0BBAEjFUYLBAcaAiYCAlchiB0Mv0uWXQwggSGOXhaCUoFBBZlJjguDOwKEEIIzfgEBAQ X-IronPort-AV: E=Sophos;i="5.09,518,1418079600"; d="scan'208";a="120222497" Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 04 Feb 2015 14:17:13 +0100 Received: from mfilter35-d.gandi.net (mfilter35-d.gandi.net [217.70.178.166]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id CC87EA80B8 for ; Wed, 4 Feb 2015 14:17:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter35-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter35-d.gandi.net (mfilter35-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 17kDEPezMmg3 for ; Wed, 4 Feb 2015 14:17:12 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPA id 7C051A80B6 for ; Wed, 4 Feb 2015 14:17:12 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 04 Feb 2015 13:17:12 +0000 From: Dario Teixeira To: caml-list@inria.fr In-Reply-To: References: <281f21387ba38386a63301a18f46392e@nleyten.com> Message-ID: <6ec715d69a25fd45f98618b20b36b4c8@nleyten.com> X-Sender: dario.teixeira@nleyten.com User-Agent: Roundcube Webmail/0.9.5 Subject: Re: [Caml-list] Obtaining module dependencies from within OCamlbuild plugin Hi Gabriel, > In OCamlbuild, most of the dependencies are detected dynamically while > the compilation runs (typically the process of producing a target (eg. > foo.cma) will run code that will decide to recursively produce lots of > targets (eg. modules listed in foo.mllib), and those are the dynamic > dependencies). Command_deps_of_tags returns the static dependencies > that have been specified by tags, by using Command.dep and > Command.pdep to associate dependencies to specific tags. Yeah, I was already afraid that was the case. There is of course an alternative strategy that could have been used instead: compute all the dependencies (by recursively invoking OCamldep et al) before starting the compilation proper. Each strategy has its advantages and disadvantages, of course. > You cannot obtain the set of dependencies of a target without actually > trying to build it. (If you were interested in this for performance > reason, a reasonable idea would be to cache the dependencies of the > last build and replay them optimistically, but I assume that's not > your point here.) As I'm sure you've guessed, my interest in this problem derives from no-alias-deps + module aliases, not performance... (see reply to the other related message) Kind regards, Dario Teixeira