caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] ocamldep, transitive dependencies, build systems, flambda
Date: Tue, 19 Jul 2016 11:20:12 +0200	[thread overview]
Message-ID: <20160719092012.GC16408@frosties> (raw)
In-Reply-To: <a0fd6322-cb22-c226-ffdf-e4869a60be27@lexifi.com>

On 05/07/2016 11:17, Nick Chapman wrote:
> There was a further issue we needed to solve to get our scheme working.
> Suppose library A lists library B as a dependency and allows this
> dependence to be exposed in its interface. Clients of library A will
> require access to the .cmi's of library B to be compiled but it seems
> unreasonable to require them to explicitly list library B as a
> dependency. We solve this by automatically running ocamlinfo on the
> public .cmi's of a library to discover additional library deps required
> by clients of the library.

Debian has a verry simple policy for dynamic link libraries:

    A library must itself be linked against any other lib it uses.

That way applications can just link libfoo if the use it and any lib
used by libfoo is automatically included as well. If libfoo changes
what other libs it needs then they get included without the app having
to do anything.


The same should work for cmi files. As you say the cmi file already
contains the info what other libs are needed. Ocaml should include
them automatically and ocamldep and the build system should not have
to care.

So I agree with you but want to go one step further. Don't even
automatically figure out the depends so you can add the libs to the
command line when linking. Have ocaml add them implizitly itself.

MfG
	Goswin

  reply	other threads:[~2016-07-19  9:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 16:49 Alain Frisch
2016-07-05  9:17 ` Nick Chapman
2016-07-18 14:47   ` Alain Frisch
2016-07-19  9:20     ` Goswin von Brederlow [this message]
2016-07-19  9:46   ` Daniel Bünzli
2016-07-05 12:00 ` François Bobot
2016-07-05 13:53 ` Gerd Stolpmann
2016-07-05 13:06 Hongbo Zhang (BLOOMBERG/ 731 LEX)
2016-07-05 13:17 ` Gabriel Scherer

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=20160719092012.GC16408@frosties \
    --to=goswin-v-b@web.de \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).