the contents of ‘file2’ erases the one of file1 EVERYWHERE, including in ‘m2’.
Is this an intentional change? The online documentation still nourishes the hope that ‘file1’ would be loaded to module ‘m1’ and ‘file2’ to ‘m2’ (which is what I actually want to achieve). Any help would be appreciated.
Are file, file1, file2 module files? The docs state that this option is there to overrule the module/2 declaration from the file, not to create one. A quick test indeed confirms this option is only honoured fro module files. AFAIK, little has changed wrt loading files in recent versions.
If you have a non-module file and want to load it into a module simply use
:- load_files(m1:file1).
(or probably more portable ensure_loaded(m1:file1).
I tried both ways. The problem occurs also if there is a module declaration in the file. Then the module declared in the module directive is created as well as the module contained in the module option of the load_files predicate and the clauses are visible in each module.
Might it be a bug related to the size of the file? It contains roughly 119000 facts. However, zipped it is just 575 KB, so I could upload it somewhere or mail it for a test.