[Omake] Subtle dependency problem
Alain Frisch
alain.frisch at lexifi.com
Thu May 29 22:34:21 PDT 2008
Aleksey Nogin wrote:
> Would not it work correctly if you simply copy the dependencies
> recursively? In other words, if you are copying foo.cmi and you have
> foo.cmi: bar.cmi dependency, then you also copy bar.cmi? Or would this
> result in copying way too much?
Well, one of the the reasons for copying .cmi files is precisely to
control exactly what is visible and what is not. We do have cases where
module X contains some type whose definition must remain private but
that are mentioned in Y's interface. Then some module Z are allowed to
use Y interface, and so manipulate (opaquely) values of those types, but
not to see their definition. So just copying file recursively is not an
option.
It should be quite easy to patch the compiler so as to report a warning
when compiling a module that requires some .cmi file without ever
mentioning the corresponding module explicitly. We're probably going to
do that...
-- Alain
More information about the Omake
mailing list