What’s the most reliable way of finding a module implicit dependencies?
In the yesterday release of Logtalk 3.30.0 I’m using the following internal predicate in the SWI-Prolog adapter file:
% '$lgt_find_module_predicate'(+atom, -atom, @callable) % % succeeds when Module:Predicate is visible in module Current '$lgt_find_visible_module_predicate'(_Current, Module, Predicate) :- predicate_property(Predicate, implementation_module(Module)).
This predicate is used when compiling Prolog modules as Logtalk objects and the linter takes advantage of it to advise on missing
use_module/2 directives. Extensive testing suggests that the reported missing directives are accurate but I wonder if the above definition should take the source module into account or if there are any gotchas that I’m missing.