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 3B9717FCEF for ; Mon, 13 Apr 2015 21:30:03 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.24; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.24; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.17.24; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BHAwCUGCxVnBgR49RcgyE9XMUcgUQGhgUCgTw6EgEBAQEBAQERAQEBAQEGDQkJFC6EHwEBAQMBJy4kEAsOCi5XBhMJiBkMCbc1IW8NlGoBAQEBAQEBAwEBAQEBHYsrhCoBASomB4ItTYEzBYYjizQBhVmDaoEdhXgDigeDTYQTbQGBCoE4AQEB X-IPAS-Result: A0BHAwCUGCxVnBgR49RcgyE9XMUcgUQGhgUCgTw6EgEBAQEBAQERAQEBAQEGDQkJFC6EHwEBAQMBJy4kEAsOCi5XBhMJiBkMCbc1IW8NlGoBAQEBAQEBAwEBAQEBHYsrhCoBASomB4ItTYEzBYYjizQBhVmDaoEdhXgDigeDTYQTbQGBCoE4AQEB X-IronPort-AV: E=Sophos;i="5.11,571,1422918000"; d="asc'?scan'208";a="134203833" Received: from mout.kundenserver.de ([212.227.17.24]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Apr 2015 21:30:02 +0200 Received: from office1.lan.sumadev.de ([178.4.18.152]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0Lwqoy-1ZS9cv2YQq-016RH7; Mon, 13 Apr 2015 21:30:01 +0200 Received: from [192.168.65.10] (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id EE35DDC05D; Mon, 13 Apr 2015 21:29:59 +0200 (CEST) Message-ID: <1428953391.22412.40.camel@e130.lan.sumadev.de> From: Gerd Stolpmann To: Ivan Gotovchits Cc: =?ISO-8859-1?Q?Fran=E7ois?= Bobot , OCaml Mailing List Date: Mon, 13 Apr 2015 21:29:51 +0200 In-Reply-To: References: <54F5B3F7.3030705@cea.fr> <1425394551.4056.1.camel@thinkpad.lan.sumadev.de> <54F6D731.3090004@cea.fr> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-uiLzHNTCrDstbSWrzL+f" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-Provags-ID: V03:K0:YOoV5yOPP70XvpYoMnNCgcsuL5KM+dibAYXEk4bB0AIPAYisP6O ZBWfKp5iszv7mRTgC/1Vk7kiVgC4o4HPGZ115g6nILGfNaOn2q/r6B1s5QPUSi9RhcM/dRv aCkj25Z6NwfbYXmq128uI5z2lO5ESuWkjUfqlwneRVfeUJbEEOnaZMEN/NDI6d5Jk/1d0Fn FCn1KVFyxEbKDW6jaz7pw== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] Dependencies between plugins --=-uiLzHNTCrDstbSWrzL+f Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Montag, den 13.04.2015, 15:27 -0400 schrieb Ivan Gotovchits: > Are there any movement in this direction, or this patches will die? Don't think so. Slowness on my side. Gerd >=20 > On Wed, Mar 4, 2015 at 4:58 AM, Fran=E7ois Bobot > wrote: > On 03/03/2015 15:55, Gerd Stolpmann wrote: > Am Dienstag, den 03.03.2015, 14:15 +0100 schrieb > Fran=E7ois Bobot: > Gerd, do you think that something that does > that could be added to ocamlfind? One tricky > thing is to > know the library statically linked (ie. > `Ocsigen_config.builtin_packages`), perhaps > ocamlfind can > during linking add this information. >=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > I think so. For toploops, there is already code that > tracks libraries > already linked into the executable (i.e. if you > ocamlmktop your > toploop). >=20=20=20=20=20=20=20=20=20 > All was already in place indeed! It was easy to add. I kept > caml-list in CC for discussing the big picture in order to get > comments from people. Is mail still your preferred way of > receiving patch? >=20=20=20=20=20=20=20=20=20 > I kept it simple, no hack (no automatic: cmxa -> cmxs) because > I prefer problems in library META to be found than to be paper > over. >=20=20=20=20=20=20=20=20=20 > The first patch adds: > - A library `findlib.dynlink` that depends on `findlib` and > `dynlink` > - During linking (using `ocamlfind ocaml*`) if `-package > findlib.dynlink` and `-linkpkg` are used then a module > `Findlib_initl...` is linked after all packages and it stores > the names of packages linked in `Findlib.linked_packages`. > - In the main program `Fl_dynlink.load_packages ["yojson"]` > can be used to dynlink packages >=20=20=20=20=20=20=20=20=20 > The second patch forbids to run `Fl_dynlink.load_packages` > during the initialization of packages (statically or > dynamically linked), because `Findlib_initl...` is not yet run > and because if you want to load a package that depend on a > statically linked package not yet initialized, there is no > sane semantic. >=20=20=20=20=20=20=20=20=20 > Problems: > - The package is named `findlib.dynlink`, the archive > `findlib_dynlink.cm*` and the module `Fl_dynlink` ... > - If you don't use `-linkall` static packages could only be > partially linked, and you can't link the remaining part later. > So perhaps `-linkall` must be automatically added if > `findlib.dynlink` is used. > - If you define `archive(native)` and not > `archive(native,plugin)` the error is not nice (in > Dynlink.Error). Perhaps I should add a > `Package_not_dynamically_loadable of string` error, that > should catch the loading of something else than `*.cmxs`. > - Often you link your binary with your own library without > using `-package` (the library is not yet installed), and > plugins for your tools depend on your library. Currently you > should do before any `Fl_dynlink.load_packages`: > `Findlib.linked_packages :=3D "mylib"::Findlib.linked_packages`. > For simplicity, I don't know if I should add a function > `Fl_dynlink.add_linked_packages`, or an option to ocamlfind > `-additional-package-statically-linked `. > - During the initialization of your own library (linked > without -package) you should not use > `Fl_dynlink.load_packages`, but the library doesn't protect > you against this error. >=20=20=20=20=20=20=20=20=20 > Choices: > - If you don't link with `findlib.dynlink` or use > `create_toploop`, the variables `Findlib.linked_packages` and > `Findlib.linked_predicates` are empty because I don't wanted > to add backward change by adding `Findlib_initl...` when > `findlib` is linked. >=20=20=20=20=20=20=20=20=20 >=20=20=20=20=20=20=20=20=20 > Remains to do: > - Fix problems > - Documentations (add `plugin` in the list of standard > predicates, ...) >=20=20=20=20=20=20=20=20=20 >=20=20=20=20=20=20=20=20=20 > Gerg, what do you think of this first version of the patch? Of > the way to fix the problems? >=20=20=20=20=20=20=20=20=20 > Thanks, >=20=20=20=20=20=20=20=20=20 >=20=20=20=20=20=20=20=20=20 > Regards, >=20=20=20=20=20=20=20=20=20 > --=20 > Fran=E7ois >=20=20=20=20=20=20=20=20=20 >=20=20=20=20=20=20=20=20=20 >=20 >=20 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-uiLzHNTCrDstbSWrzL+f Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJVLBkvAAoJEAaM4b9ZLB5TJSEH/iwfuj/+VFGYSkF/wnwcxS+e /RmLmWXk38cDM1zJzVWze+114YZz56XJwTOV3EdEBiHTQ1K/uHQ090n1UD1V2Fap gpavnUMpfegPx29jXdqIkw7ZI6ndcUOkUtL0TQYWeBoo6oLgS3p4A4JEzoo4krBn J+v95XMjzrKVOqvzgFNe63uVf6O9FbriuM9ILu8IgVh3bc4NelcuO40wgGfsDmQ4 5TtiOdUjJKqPfPEaW6gX8A+k/NsOOJA4ZDWWQnLuLrXZ262jeAP8cXt5TDrxA7Fq /e8ZRUukmd9Ot752pxayXsrUw5NLsygISgT2wfWlXd+JCD4YH5gLXlcEJX5PiSc= =s2zJ -----END PGP SIGNATURE----- --=-uiLzHNTCrDstbSWrzL+f--