-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alias based packs #23
Comments
So far, the simplest way to use
I have just ported one of my libraries ( Only one downside is that you have to rename your modules to something which would not corride with other libraries, since they are no longer packed into a packed module. For examlpe It would be nice if we have a super |
As it is implemented currently, -no-alias-deps is highly experimental. If it was considered a regular language feature, packing would be re-implemented with it (or an alternative -alias-based-pack mechanism would be offered). How could omake help in the current situation? The ingredients are (as described in section 7.13 of the OCaml manual):
Omake can only implement the first two points. The third is still up to the user. There is also no way to automatically choose a unique prefix for the member modules (e.g. via a -module-prefix option of ocamlc/ocamlopt). My opinion on that is: as long as it is experimental and not so well supported by the compiler, let's ignore it. The alternative (if you care about code size) is not to pack at all. |
@gerdstolpmann Why do you think that -no-alias-deps is experimental? Seems like it's been implemented for quite a while (4.02?) and has some serious users (Janestreet to name one example). In my opinion, it would have many more users if it wasn't so difficult to use due to weak support from build systems. |
This is just my interpretation of the status: it exposes implementation details to the user (even requires that the user takes them over partly). In my view this is just an attempt to figure out whether it would work at all like this. The real implemention would be to hide all the details from the user, and the interface would be largely the same as for -pack nowadays. |
omake supports building traditional packs with
OCamlPackage
but as you know, these are effectively deprecated since module aliases have been introduced.It would be great if omake supported something very similar to
OCamlPackage
but used aliases under the hood.cc'ing @camlspotter because he both uses omake and understands how aliases work as evident by https://github.com/camlspotter/caml-module-alias-link
However, I'd be happy to work on this as well if given some pointers.
The text was updated successfully, but these errors were encountered: