caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <dario.teixeira@nleyten.com>
To: caml-list <caml-list@inria.fr>
Subject: [Caml-list] Obtaining module dependencies from within OCamlbuild plugin
Date: Tue, 03 Feb 2015 20:01:48 +0000	[thread overview]
Message-ID: <281f21387ba38386a63301a18f46392e@nleyten.com> (raw)

Hi,

I'm trying to manipulate a project's dependencies from within an 
OCamlbuild
plugin, and one prerequisite is obtaining the current set of 
dependencies
for a given module.  For instance, to obtain the set of dependencies for
module "src/foo_c.ml", one could expect to invoke the following from 
within
the After_rules hook of myocamlbuild.ml:

   Command.deps_of_tags (tags_of_pathname "src/foo_c.ml")

This always returns an empty list, however.  The same holds if one tries
to narrow the list of tags to just the filename:

   Command.deps_of_tags (Tags.of_list ["file:src/foo_c.ml"])

One possible explanation for this behaviour is that the set of 
dependencies
has not been computed yet when the After_rules hook is invoked.  Is that 
the
case, or am I missing something altogether different?  Either way, how 
do I
obtain the set of dependencies?

Thanks in advance for your attention!
Kind regards,
Dario Teixeira


             reply	other threads:[~2015-02-03 20:01 UTC|newest]

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

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=281f21387ba38386a63301a18f46392e@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).