Meson: Modules are global to all subprojects and references to the Interpreter are never updated

Created on 28 Aug 2018  路  1Comment  路  Source: mesonbuild/meson

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.

bug parseinterpreter subprojectwraps

Most helpful comment

There should be a :scream: reaction for issues.

>All comments

There should be a :scream: reaction for issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adamryczkowski picture adamryczkowski  路  4Comments

eyelash picture eyelash  路  4Comments

keszybz picture keszybz  路  3Comments

inigomartinez picture inigomartinez  路  5Comments

ignatenkobrain picture ignatenkobrain  路  4Comments