dune
dune copied to clipboard
Suggest specifying package as a solution to a public library depending on a private library
Currently, if I have a private library (that doesn't have a public name), and a public library that depends on it, dune gives this error:
Error: Library "private" is private, it cannot be a dependency of a public library. You need to give "private" a public name.
I would love to see this changed to something like:
Error: Library "private" is private, it cannot be a dependency of a public library. You need to give "private" a public name or specify a package for it.
This is a feature I personally learned about just today. I wish I had known this earlier, because I've used more involved workarounds earlier.
How about adding a "hint" with your suggested text as the message to this error?
Any formulation of the message that helps people discover that public libraries may actually depend on private libraries if you just specify the package for those private libraries is fine with me.