-
Notifications
You must be signed in to change notification settings - Fork 456
Better support for mli/rei only modules #489
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
Conversation
Isn't it more |
|
Indeed... I updated the description |
rgrinberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that this implementation accepts making the alias module "mli only" when (wrapped true) is set. Is that correct? If it is, what are the semantics of that?
| in | ||
| let opaque = | ||
| if cm_kind = Cmi && not (Module.has_impl m) && ctx.version >= (4, 03, 0) then | ||
| Arg_spec.A "-opaque" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess modules without implementation cannot introduce cross module optimization, is that why we add it unconditionally? A bit unrelated but others have noted that this is would be desirable in situations where they prefer faster recompilation over better generated code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to silence a warning from the compiler, for some reason it still looks for the cmx.
A bit unrelated but others have noted that this is would be desirable in situations where they refer faster recompilation over better generated code.
Indeed, we should add support for that at some point. Is -opaque itself enough BTW? Or do we need to hide the cmx files as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I've made a ticket for it #497
Currerntly the scheme is as follow: for a library named
There is no point giving an implementation to |
Yeah, I think that makes sense if it doesn't break anything. Ok, looks good. Thanks for explaining. |
|
BTW, I'm wondering if we even need to install foo__.cmi |
| directory can't see each other unless one of them depend on the | ||
| other (#472) | ||
|
|
||
| - Better support for mli/rei only modules (#490) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be #489
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it's now fixed. Thanks
Jbuilder now supports them. However, given that we can't check that a module is a pure interfaces and that not respecting this rule could lead to hard to debug errors, the user is required to explicitly list such modules.
The syntax is as follow: