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 0BBAF7FD92 for ; Sat, 11 Jun 2016 17:20:34 +0200 (CEST) IronPort-PHdr: 9a23:QPosnBFe7gceDLwpHnLlgp1GYnF86YWxBRYc798ds5kLTJ75rsSwAkXT6L1XgUPTWs2DsrQf27uQ7PGrCTdIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/nhqbtqtaDOE1hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4gyLeVhOC7WcwVWAfkxwAQ1SUrUKyYpCkmyfgt+d7kA+TMcDsBeQ9VS6j4qFDThj0i2EALTFvo0/Njcklo6tRuhOso1REyI7ZeoyPfK5xd6nHfN4eA3FKXstLWjZpDYa1bo9JBO0Ea7UL57LhrkcD+EPtTTKnA/nin3oV33I= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-it0-f48.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.48 as permitted sender) identity=mailfrom; client-ip=209.85.214.48; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-it0-f48.google.com) identity=helo; client-ip=209.85.214.48; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-it0-f48.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AGAQBgK1xXfTDWVdFdg1w4fQaqA48Kgg+BeSKFdQKBHQc4FAEBAQEBAQEBEQEBCQsLCSEvgjCCGwEBBBIRHQEbEgsBAwwGBQsNAgIJHQICIQEBEQEFAQoSBhMSEIdzAQMXDp9GgTE+MYs7gWqCWQWHRgoZJwMKUoMsAQEBAQEBBAEBAQEbAgYQcYUmg0qBA4JDHYRhgloBBIZFDJFcNIFYhCyCeIMygXqCN4xpiAGGLhIegQ8egjCCECAyiggBAQE X-IPAS-Result: A0AGAQBgK1xXfTDWVdFdg1w4fQaqA48Kgg+BeSKFdQKBHQc4FAEBAQEBAQEBEQEBCQsLCSEvgjCCGwEBBBIRHQEbEgsBAwwGBQsNAgIJHQICIQEBEQEFAQoSBhMSEIdzAQMXDp9GgTE+MYs7gWqCWQWHRgoZJwMKUoMsAQEBAQEBBAEBAQEbAgYQcYUmg0qBA4JDHYRhgloBBIZFDJFcNIFYhCyCeIMygXqCN4xpiAGGLhIegQ8egjCCECAyiggBAQE X-IronPort-AV: E=Sophos;i="5.26,456,1459807200"; d="scan'208";a="222042469" Received: from mail-it0-f48.google.com ([209.85.214.48]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 11 Jun 2016 17:20:33 +0200 Received: by mail-it0-f48.google.com with SMTP id a5so17729073ita.1 for ; Sat, 11 Jun 2016 08:20:33 -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; bh=bZxUb5m2YSL7OTH21XFVJNBZ2DOqhKXOfJLPVREqbcQ=; b=1DpJc15mJx16EfV7L+4xiUJivK1gsf8IPbk9jn2/TdVFvi1/mTj+vYNK12vvhp0D4I Mn0fTfAb2TPDj5LClelVl04mrznKlzZv2tiEXQ0M/GfOqRWE1RwUPTjj6eTj+tKqrsgD FglX8lvcsD6z7rV/Nb1gZJv4vn6KZA/7K2RQWrwJjHuwemj3j6xp0yHomLw12jxNpXkF nJhgjAr1JN5PM+zu+cxLUFyLyvucEwODHHBrnzhlAYNWhlu28zHWkHjvdVBW9Y5pCA/U mvtB2bJDXSmj2GqKgZK8ci6TATD/ZNAM46GR+H778RkClxOu3wkI7G5U91d9G7imF71c SBjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bZxUb5m2YSL7OTH21XFVJNBZ2DOqhKXOfJLPVREqbcQ=; b=LDeaLUEysNFjKwr3/vAKy9D3RMgRhDcZN9zGlHrrY+UIxf1jJUceXsPj2/FOoa8FDf dPYl2FgnLOaaQTBn+fIFojTqY2z8x9SaLQ4AVJKLHC79AS6nbvlQ7TVwZseW6WnInvw2 6kW9mZjvVinPGkZDe39wv3DQKsqCNs/4E0B8V2TkvCcWYWeERj1LVmt91KJBU2KJ6Ypg vs2ML/mUYdrw05xjjkNifU3UyZsTOZHTBQP8fO9QFNVhby5L7xTD7NdS0S38q1ME+1R3 JhZd12QU7NpmfZV//DPluGJX0YMtvbZJfgS98V/1ymbwmoJ1T27hZ8h3TQwa0q28+opW n8CA== X-Gm-Message-State: ALyK8tK2VS3A187UplzvJOpPDXjZqnlcC8AlqpsXtMkEsnSaUWg/2Ue+TjOHGN0LLNT+HlJ06QuFCtc9YzH7cw== X-Received: by 10.36.23.206 with SMTP id 197mr6034326ith.15.1465658432003; Sat, 11 Jun 2016 08:20:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.89.195 with HTTP; Sat, 11 Jun 2016 08:19:52 -0700 (PDT) In-Reply-To: References: <20160610083920.GA2053@aepfle.de> <9132B0B457FF4160BE7708C9DC0CFA43@erratique.ch> <20160610103739.GA10035@aepfle.de> <20160611061407.GA3981@notk.org> <20160611082021.GB3981@notk.org> From: Gabriel Scherer Date: Sat, 11 Jun 2016 11:19:52 -0400 Message-ID: To: Adrien Nader Cc: Olaf Hering , =?UTF-8?Q?Daniel_B=C3=BCnzli?= , caml users Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] OASIS circular dependency in xml-light I sent a preliminary pull request to break the cycles at https://github.com/ncannasse/xml-light/pull/3 Any comments are welcome, but we could move the discussion to this pull request. On Sat, Jun 11, 2016 at 8:03 AM, Gabriel Scherer wrote: > I have the same memories of tricky circular dependencies from looking > at the xml-light sources a while ago, and if I remember correctly > there were some really shady Obj.magic going on at the same time. If > people depend on this library, the best fix is probably to clean it up > in these respects. > > On Sat, Jun 11, 2016 at 4:20 AM, Adrien Nader wrote: >> Well, it has seen some development in the past couple years on github. >> >> Anyway, back to the original problem. >> >> xml.ml references Dtd >> dtd.ml references Xml (through 'open Xml', which is needed) >> >> xml.mli does not reference Dtd >> dtd.mli references Xml >> >> Currently xml.mli is compiled, then dtd.mli, then dtd.ml and finally >> xml.ml (there are other modules involved but they don't seem to be >> involved in the loop). I'm not completely surprised this works but I >> didn't know it was possible (my current version here is 4.01.0 but it >> has probably been that way for a long time). Maybe someone else can >> comment on that. >> >> I'm actually wondering how this works wrt module initialization order. >> >> I think the sure way would be to move at least some declarations to a >> separate module that has no dependency on others and which both Xml and >> Dtd could depend on. >> >> -- >> Adrien Nader >> >> -- >> 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