caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <dario.teixeira@nleyten.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Obtaining module dependencies from within OCamlbuild plugin
Date: Wed, 04 Feb 2015 13:17:12 +0000	[thread overview]
Message-ID: <6ec715d69a25fd45f98618b20b36b4c8@nleyten.com> (raw)
In-Reply-To: <CAPFanBG-NeUzJdodH_=ChjQSDxMw6FgPciAMS8OfD=aS7Z18Tg@mail.gmail.com>

Hi Gabriel,

> In OCamlbuild, most of the dependencies are detected dynamically while
> the compilation runs (typically the process of producing a target (eg.
> foo.cma) will run code that will decide to recursively produce lots of
> targets (eg. modules listed in foo.mllib), and those are the dynamic
> dependencies). Command_deps_of_tags returns the static dependencies
> that have been specified by tags, by using Command.dep and
> Command.pdep to associate dependencies to specific tags.

Yeah, I was already afraid that was the case.  There is of course an
alternative strategy that could have been used instead: compute all the
dependencies (by recursively invoking OCamldep et al) before starting 
the
compilation proper.  Each strategy has its advantages and disadvantages,
of course.


> You cannot obtain the set of dependencies of a target without actually
> trying to build it. (If you were interested in this for performance
> reason, a reasonable idea would be to cache the dependencies of the
> last build and replay them optimistically, but I assume that's not
> your point here.)

As I'm sure you've guessed, my interest in this problem derives from
no-alias-deps + module aliases, not performance... (see reply to the
other related message)

Kind regards,
Dario Teixeira


      reply	other threads:[~2015-02-04 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 20:01 Dario Teixeira
2015-02-03 20:59 ` Gabriel Scherer
2015-02-04 13:17   ` Dario Teixeira [this message]

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=6ec715d69a25fd45f98618b20b36b4c8@nleyten.com \
    --to=dario.teixeira@nleyten.com \
    --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).