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 01F907F6CC for ; Tue, 3 Feb 2015 22:14:32 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.174 as permitted sender) identity=mailfrom; client-ip=209.85.223.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@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-ie0-f174.google.com) identity=helo; client-ip=209.85.223.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ie0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CDAQABOdFUm67fVdFag1hZBIJ9sj+PSoVxAoEZB0MBAQEBAREBAQEBAQYLCwkULoQNAQEEEhEdARsSCwEDDAYFCw0CAgkdAgIiAREBBQEKEgYTEggIh3YBAxENtBk+MYsugWuCd4shChknAwpUhRcBAQEBAQUBAQEBARcBBQ6BE45XB4JogUEFhEoKjgaFWIFNj0gSI4EMCYQRPTGCQgEBAQ X-IPAS-Result: A0CDAQABOdFUm67fVdFag1hZBIJ9sj+PSoVxAoEZB0MBAQEBAREBAQEBAQYLCwkULoQNAQEEEhEdARsSCwEDDAYFCw0CAgkdAgIiAREBBQEKEgYTEggIh3YBAxENtBk+MYsugWuCd4shChknAwpUhRcBAQEBAQUBAQEBARcBBQ6BE45XB4JogUEFhEoKjgaFWIFNj0gSI4EMCYQRPTGCQgEBAQ X-IronPort-AV: E=Sophos;i="5.09,515,1418079600"; d="scan'208";a="98742290" Received: from mail-ie0-f174.google.com ([209.85.223.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 03 Feb 2015 22:14:32 +0100 Received: by mail-ie0-f174.google.com with SMTP id vy18so28455693iec.5 for ; Tue, 03 Feb 2015 13:14:30 -0800 (PST) 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=a0OUfosm5M5W0rItgMP1wJVFYRip/GLbRQ8TQnNPbOQ=; b=G9LuwrOTAVUeJRAp7j+Q8nn7Hbi6Q+/sK7mOoYLWPeSOkIa3jPZZF7cnI3H7HtsOSv XUBtMyuDtUfQljEytxzwXFhLLHsN+oUtqOb1dTC9g9LWB33/JtnbjkVu5EL8Cco0xukx xGE0HjevhzkPhbSCbddHCjScbzPe4djcZ7r+R+2Ef+a36Yon2AC/FolFpuSJe3TDX4u+ LlfjYiSLcGOdhTD5SzYe9wEs+IzOTI/GqVfGuh+aFrtmrP8W3MFkaebAQ1lWKIPdi4ap PQmdSGa4x8ZS8OlCp1wdB2Hz98jZF4hPxlicZ5kHnIT71POKWDBjHQG9/0/iQs/vyVX+ fYSQ== X-Received: by 10.107.15.146 with SMTP id 18mr12740115iop.57.1422998070796; Tue, 03 Feb 2015 13:14:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.13.195 with HTTP; Tue, 3 Feb 2015 13:13:50 -0800 (PST) In-Reply-To: <5c76729753733a2ccbf1cad96879c312@nleyten.com> References: <7bca26c097b73f653bd8bbfa1a07eaa8@nleyten.com> <20150123164111.GA16664@yquem.inria.fr> <0fd907ee06bedeff816160b9e7b9c027@nleyten.com> <6829d3482c94fbe2e22dd1574618e86e@nleyten.com> <5c76729753733a2ccbf1cad96879c312@nleyten.com> From: Gabriel Scherer Date: Tue, 3 Feb 2015 22:13:50 +0100 Message-ID: To: Dario Teixeira Cc: caml users Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Forcing OCamlbuild to compile a file before another I haven't given much thought to it yet, but here would a sketchy idea of how to better support -no-alias-deps in OCamlbuild: ocamldep) extend ocamldep with a new -paths (as an extension over -modules) that returns not just the modules M appearing at the beginning of paths in source files, but the full module-longident (eg. M.Foo.Bar if you access the value M.Foo.Bar.baz or constructor M.Foo.Bar.Foobar) ocamlbuild) use ocamldep -modules (this happens in ocaml_utils.ml:read_path_dependencies), and for a non-singleton path of the form Foo.Bar, first type-check the compilation unit Foo, then inspect the .cmi to know whether Bar is defined as a module alias of Foo, and in that case depend on the aliased compilation unit (This should be done as a modification to the tool itself rather than a plugin, I think.) On Mon, Jan 26, 2015 at 1:30 PM, Dario Teixeira wrote: > Hi again, > >> Yeap, I understand. The good news is that it should be possible to use >> module-aliases/no-aliases-deps/pseudo-circular-recursion within the >> current >> OASIS+OCamlbuild framework with only minimal extra burden on the user, >> and zero modifications to OASIS or OCamlbuild. >> >> I had to bump my forehead against the wall a few times, but in the end >> I've >> managed to get the full combination working on a toy example, and I'm >> confident >> I can also get it to work on the much larger Lambdoc code base. I'll keep >> you posted... > > > (replying to myself here) > > I may have spoken too soon on the ease of tweaking a build system based on > OASIS + OCamlbuild to work with module aliases and -no-alias-deps: the toy > example does compile from scratch, but the build system gets confused by > subsequent modifications to source files. > > I have created a branch in the Lambdoc repo for experimenting with this > process [1]. If you try to compile it, it almost works, but you do get > lots of nasty warnings and a generally confused build system. > > Kind regards, > Dario Teixeira > > [1] https://github.com/darioteixeira/lambdoc/tree/oasification > > > > -- > 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