Plasma GitLab Archive
Projects Blog Knowledge

Querying descendants

It is often useful to find out the descendants of a package, i.e. all direct or indirect users of the package. There is another "ocamlfind" subcommand that allows us to query descendants. For example, to get the direct and indirect users of p, type in

ocamlfind query -descendants p

The set of packages that are possible descendants is determined as follows:

  • All packages located in directories mentioned in the environment variable OCAMLPATH are candidates. Note that only package directories containing META files are taken.

  • The packages in the default package directory are candidates, too.

  • If there are two packages with the same name, only the first counts, i.e. the first in OCAMLPATH, then the one in the default directory.

After this set has been determined, the complete dependency graph is constructed on it. As the descendants are queried, the dependencies are read in the inverse way compared with queries of the ancestors.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml