Basically, we have one single module of a kind for the whole process, but the Module has a reference to an interpreter.
Imagine a simple project A with a subproject B, project A does import('mymodule'), now mymodule is being initialized with:
def initialize(interpreter):
return MyModule(interpreter)
So probably MyModule keeps a reference to the interpreter to use it later (to use source_strings_to_files method for example) but.. once we enter project B and do import('mymodule')again the same MyModule object is used, so when we use that object the interpreter we kept a reference on is the one from module A meaning using that function returns wrong values.
This was discoverer when working on #4016 but should definitely not block it.
There should be a :scream: reaction for issues.
Most helpful comment
There should be a :scream: reaction for issues.