-
Notifications
You must be signed in to change notification settings - Fork 416
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
META file includes private libraries #580
Conversation
This is incorrect as those aren't installed
Btw, I suppose the proper way to handle this would be to install the private libraries archives except for the cmi's so they're unusable. But I think this requires us to have the strict libraries feature. So that the internal library is hidden for all in-source consumers of the lib. |
I don't think this was ever supported. The fix is to make jbuilder report an error in this case |
You don't agree with my proposal of installing the private libs without their cmi's? Seems like that would be adequate to solve this problem and also useful. It shouldn't very hard once we have strict includes. I'll make it an error for now though. As it's much better than what we have now. |
But if the library has no public name, what do you attach the .cma of the private lib to? i.e. what |
Yeah, adding the .cma's to the the library that is using the internal libraries will work. The only issue here seems to be the possible duplication on the file system. As other public libs using these private dependencies will also want to install these. Another way would be to install the private libs as their own findlib packages but not install their cmi's. We'll perhaps need some sort of name mangling scheme so that users aren't tripped up by these private libraries. Anyway, I'm not 100% sure of this implementation, but I think the idea of public libraries using private dependencies is sound. |
There is one more issue: let's say you have 3 public libraries
if you add |
We discussed this at some point with @bobot. I think it's a lot simpler if such libraries have their own findlib package. Sometimes authors might want such libraries to be hidden as they don't correspond to things users should use directly. For such cases we could have a convention: for instance when one component in the findlib name starts with an underscore, it is not displayed by |
This is incorrect as those aren't installed.
@diml this is a pretty serious bug that was discovered in mirage/ocaml-git#280 (comment)
I suppose the fix is to exclude these private names and include the .cm files in the libraries that depend on the private stuff.
I'm not really sure when this regression was introduced either. I recall this case working fine before. I wonder when this regression was introduced.