You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was supposed to be done as part of #3655, but since it turns out be a pretty large change, I decided to create a separate proposal for this.
Problem
Private libraries defined in different projects may collide. Consider these two private libraries defined in different dune projects:
(library
(name helper)
(package foo))
and
(library
(name helper)
(package bar))
While the two libraries can be installed, they cannot be used in the same library or executable.
Solution
Choose a compilation unit name that reflects that such private libraries are unique, and then use -open on libraries that users of such library to hide it. The scheme will look as follows:
pkg__private__helper will be the prefix for the compilation unit and the name of the lib interface module.
There will be an additional module pkg__private__helper__pub with the following rename:
moduleHelper=Pkg__private__helper
Whenever helper is used, -open Pkg__private__helper__pub will be inserted.
Note that this proposal will also require package private libraries to be (wrapped true). I think that's a good idea regardless.
This was supposed to be done as part of #3655, but since it turns out be a pretty large change, I decided to create a separate proposal for this.
Problem
Private libraries defined in different projects may collide. Consider these two private libraries defined in different dune projects:
and
While the two libraries can be installed, they cannot be used in the same library or executable.
Solution
Choose a compilation unit name that reflects that such private libraries are unique, and then use
-open
on libraries that users of such library to hide it. The scheme will look as follows:pkg__private__helper
will be the prefix for the compilation unit and the name of the lib interface module.pkg__private__helper__pub
with the following rename:helper
is used,-open Pkg__private__helper__pub
will be inserted.Note that this proposal will also require package private libraries to be
(wrapped true)
. I think that's a good idea regardless.I'd like to see what @bobot and @aalekseyev think about this.
The text was updated successfully, but these errors were encountered: