From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Ivan Gotovchits <ivg@ieee.org>
Cc: "François Bobot" <francois.bobot@cea.fr>,
"OCaml Mailing List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Dependencies between plugins
Date: Mon, 13 Apr 2015 21:29:51 +0200 [thread overview]
Message-ID: <1428953391.22412.40.camel@e130.lan.sumadev.de> (raw)
In-Reply-To: <CALdWJ+zHfRORxQ-LjFa2f1SG4eLEZABhgHc_S8MWd2L_cPktJw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5086 bytes --]
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
>
> On Wed, Mar 4, 2015 at 4:58 AM, François Bobot <francois.bobot@cea.fr>
> wrote:
> On 03/03/2015 15:55, Gerd Stolpmann wrote:
> Am Dienstag, den 03.03.2015, 14:15 +0100 schrieb
> François 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.
>
> I think so. For toploops, there is already code that
> tracks libraries
> already linked into the executable (i.e. if you
> ocamlmktop your
> toploop).
>
> 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?
>
> 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.
>
> 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
>
> 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.
>
> 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 := "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.
>
> 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.
>
>
> Remains to do:
> - Fix problems
> - Documentations (add `plugin` in the list of standard
> predicates, ...)
>
>
> Gerg, what do you think of this first version of the patch? Of
> the way to fix the problems?
>
> Thanks,
>
>
> Regards,
>
> --
> François
>
>
>
>
--
------------------------------------------------------------
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
------------------------------------------------------------
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-04-13 19:30 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 13:15 François Bobot
2015-03-03 13:40 ` Gabriel Scherer
2015-03-03 14:23 ` François Bobot
2015-03-03 14:31 ` Maxence Guesdon
2015-03-03 14:32 ` Ivan Gotovchits
2015-03-03 14:42 ` Sebastien Mondet
2015-03-03 15:02 ` François Bobot
2015-03-03 15:24 ` Sebastien Mondet
2015-03-03 14:51 ` François Bobot
2015-03-03 14:55 ` Gerd Stolpmann
2015-03-04 9:58 ` François Bobot
2015-04-13 19:27 ` Ivan Gotovchits
2015-04-13 19:29 ` Gerd Stolpmann [this message]
2015-04-14 8:59 ` François Bobot
2015-04-14 9:47 ` Stéphane Glondu
2015-04-14 12:45 ` François Bobot
2015-04-27 9:51 ` Gerd Stolpmann
2015-04-27 10:16 ` Gabriel Scherer
2015-04-27 12:16 ` François Bobot
2015-04-27 12:32 ` Daniel Bünzli
2015-04-29 12:00 ` Gerd Stolpmann
2015-04-27 11:55 ` François Bobot
[not found] ` <1735_1425463114_54F6D748_1735_16789_8_54F6D731.3090004@cea.fr>
2015-03-06 11:45 ` François Bobot
2015-04-14 12:21 ` Gabriel Kerneis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428953391.22412.40.camel@e130.lan.sumadev.de \
--to=info@gerd-stolpmann.de \
--cc=caml-list@inria.fr \
--cc=francois.bobot@cea.fr \
--cc=ivg@ieee.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox