gasche / manual-ocamlbuild

A new reference manual for the ocamlbuild tool
Other
67 stars 15 forks source link

Restrict to packed usage. #11

Open rgrinberg opened 9 years ago

rgrinberg commented 9 years ago

Suppose that I'm creating some packed module $ cat X.mlpack

A
B

Is it possible to somehow make A and B invisible from outside the pack. The purpose of this is to be able to create A (outside the pack) and be able to access X.A

rgrinberg commented 8 years ago

Ping?

Here's a concrete example of how I'm getting bit by this. I'm trying to create an async-tls package in ocaml-tls but ocaml-tls already has a Core module that's inside the Tls pack [1] This means that I can't use JSC's core because it's being shadowed by the internal Core module. I'd love to be able to work around this somehow.

Or perhaps I'm just really confused and this is an oasis issue?

[1] https://github.com/mirleft/ocaml-tls/blob/99384104e09b21a736872854e0a69615a4545780/_oasis#L25

gasche commented 8 years ago

Sorry for not being very reactive. I think this is an issue with ocamlbuild rather than with the ocamlbuild manual. You should feel free to open an issue on the bugtracker. I don't know how to solve it off the top of my head (which does not mean there is no solution today). Have you tried to work around it by playing with the non_dependency function from myocamlbuild.ml?

From signatures.mli:

  (** [non_dependency module_path module_name]
      Example:
         [non_dependency "foo/bar/baz" "Goo"]
      Says that the module [Baz] in the file [foo/bar/baz.*] does
      not depend on [Goo]. *)
  val non_dependency : Pathname.t -> string -> unit