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 1621E7F75C for ; Wed, 10 Sep 2014 13:07:28 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.216.173 as permitted sender) identity=mailfrom; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qc0-f173.google.com) identity=helo; client-ip=209.85.216.173; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-qc0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvQBAHwwEFTRVditlWdsb2JhbABZDgiDSlcEgnjFSoFoh0wBgQQIFhABAQEBBw0JCRIshAMBAQEDARIRHQEbHQEDAQsGBQQHDSoCAiIBEQEFARwGEyKICwEDCQgNnBJrizCBcoMQiQ8KGScNZoVTAREBBQ6PPweCeYFTBZVxhwKBX40WhEcYKYRQXiEvAQGCTQEBAQ X-IPAS-Result: AvQBAHwwEFTRVditlWdsb2JhbABZDgiDSlcEgnjFSoFoh0wBgQQIFhABAQEBBw0JCRIshAMBAQEDARIRHQEbHQEDAQsGBQQHDSoCAiIBEQEFARwGEyKICwEDCQgNnBJrizCBcoMQiQ8KGScNZoVTAREBBQ6PPweCeYFTBZVxhwKBX40WhEcYKYRQXiEvAQGCTQEBAQ X-IronPort-AV: E=Sophos;i="5.04,498,1406584800"; d="scan'208";a="93936506" Received: from mail-qc0-f173.google.com ([209.85.216.173]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Sep 2014 13:07:02 +0200 Received: by mail-qc0-f173.google.com with SMTP id w7so18973030qcr.32 for ; Wed, 10 Sep 2014 04:07:01 -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 :cc:content-type; bh=mXOBApwpLKhKBSz0Y6SRcmk8UGDVbTo2sYi6UpB1Www=; b=ROKKKyKoL5fjR2c06Aim6vpyIspR+jcX4rZGERLyFiQEpb0xbLdt4lnyvIWkwbWu8e bsJ12MAEsp/4cABFK//eOYyQJc0/tmt9kQ+sCyioy9UQv9pdmxFJxsitNX/0gSlGobeJ C01NKj7vLLZago90YtpIoBuwaOIOnhaV9h0arLqujFodnb0Dpy2+c+grldsNwt652qat w6VcYKuZ12gu/cWpUCLWcbdlgNGHAmTQb3gqFtH/WRnBUdrHuK2+V58PmYcCIJDFUyBf YydBMJOxlkIEVyEj0ReylOJtc+MerR8np+xU4XAgvM3BAW7fEWNDWS8YwvxEGTsAnS2N nCEg== X-Received: by 10.229.97.67 with SMTP id k3mr58571253qcn.1.1410347221560; Wed, 10 Sep 2014 04:07:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.138.15 with HTTP; Wed, 10 Sep 2014 04:06:40 -0700 (PDT) In-Reply-To: References: From: Ashish Agarwal Date: Wed, 10 Sep 2014 07:06:40 -0400 Message-ID: To: Jacques Garrigue Cc: OCaml Mailing List Content-Type: multipart/alternative; boundary=001a11346b1826b6540502b40db8 Subject: Re: [Caml-list] ocamldep and module aliases --001a11346b1826b6540502b40db8 Content-Type: text/plain; charset=UTF-8 Thanks for the suggested workaround. I have to figure out how to implement it. Since I'm using OMake, I can't easily exclude mylib.ml. I have to either modify OMake's OCaml module or change my build system completely. On Wed, Sep 10, 2014 at 1:37 AM, Jacques Garrigue < garrigue@math.nagoya-u.ac.jp> wrote: > (added link) > On 2014/09/10 07:21, Ashish Agarwal wrote: > > > Is ocamldep 4.02 supposed to support the -no-alias-deps flag too? It > doesn't, so I'm not sure how to implement the example at the end of Section > 7.17 [1] on a real library. Specifically, I use omake, which calls > ocamldep, and I don't see how to avoid it claiming circular dependencies > even though I've added -no-alias-deps to the compilation flags. > > > > [1] > http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#s%3Amodule-alias > > Indeed, this is not supported by ocamldep, and I'm not sure that it would > do > much sense to support it fully at this point, as what you need to do is > going to depend on how you use module aliases. > If you follow the recipe described in my ML workshop slides [2], what you > can do is leave your files unmodified (short names both inside and > outside), and use command line flags for copilation: > ocamlopt -no-alias-deps -open Mylib -o mylibA.cmx a.ml > > If you do that, just use ocamldep to compute the dependencies without > mylib.ml, and post-process the results to add a mylib prefix to all file > names. > > Once the common idioms become clearer, we will probably want to add > some kind of support to ocamldep (to avoid this post-processing). > > Jacques Garrigue > > [2] http://www.math.nagoya-u.ac.jp/~garrigue/papers/index.html#modalias > > --001a11346b1826b6540502b40db8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for the suggested workaround. I have to figure out = how to implement it. Since I'm using OMake, I can't easily exclude = mylib.ml. I have to either modify OMake'= ;s OCaml module or change my build system completely.


On Wed, Sep 10, 2014 at 1:37 = AM, Jacques Garrigue <garrigue@math.nagoya-u.ac.jp> wrote:
(added link)
On 2014/09/10 07:21, Ashish Agarwal wrote:

> Is ocamldep 4.02 supposed to support the -no-a= lias-deps flag too? It doesn't, so I'm not sure how to implement th= e example at the end of Section 7.17 [1] on a real library. Specifically, I= use omake, which calls ocamldep, and I don't see how to avoid it claim= ing circular dependencies even though I've added -no-alias-deps to the = compilation flags.
>
> [1] http://caml.inria.fr/pub/docs/manual-ocam= l/extn.html#s%3Amodule-alias

Indeed, this is not supported by ocamldep, and I= 9;m not sure that it would do
much sense to support it fully at this point, as what you need to do is
going to depend on how you use module aliases.
If you follow the recipe described in my ML workshop slides [2], wha= t you
can do is leave your files unmodified (short names both in= side and
outside), and use command line flags for copilation:
=C2=A0ocamlopt -no-alias-deps -open Mylib -o mylibA.cmx a.ml

If you do that, just use ocamldep to compute the dependencies without
mylib.ml, and post-proces= s the results to add a mylib prefix to all file names.

Once the common idioms become clearer, we will probably want to add
some kind of support to ocamldep (to avoid this post-processing).

Jacques Garrigue

[2]=C2=A0 =C2=A0http://www.math.nagoya-u.ac.j= p/~garrigue/papers/index.html#modalias


--001a11346b1826b6540502b40db8--