-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Detach the Interpreter from the Backend #15079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dcbaker
merged 8 commits into
mesonbuild:master
from
bonzini:backend-interpreter-verboten
Oct 16, 2025
Merged
Detach the Interpreter from the Backend #15079
dcbaker
merged 8 commits into
mesonbuild:master
from
bonzini:backend-interpreter-verboten
Oct 16, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d23426a
to
9c97f9d
Compare
9c97f9d
to
ff4661a
Compare
bruchar1
reviewed
Oct 6, 2025
ff4661a
to
aa3b281
Compare
bruchar1
reviewed
Oct 6, 2025
b7a991e
to
763684c
Compare
There is no generator list in the Interpreter. Signed-off-by: Paolo Bonzini <[email protected]>
GeneratedList does not need the full interpreter, only the source and build directories which can be found in Environment. Signed-off-by: Paolo Bonzini <[email protected]>
Objects like targets already store the environment in which they were created, do the same for Generator: pass it to the constructor and use it in process_files. Signed-off-by: Paolo Bonzini <[email protected]>
All that is needed is the subdir, pass it explicitly (and make it an optional argument so that the backend does not have to pass it). Signed-off-by: Paolo Bonzini <[email protected]>
The interpreter's build_def_files are the only remaining piece of interpreter state used by the backend. Compute it once and store it in build, using a property to ensure that it's initialized and accessed correctly. This also removes one of the cases in which introspection uses the interpreter object. Signed-off-by: Paolo Bonzini <[email protected]>
Another place where the interpreter is accessed surreptitiously is dependency introspection, which looks at the variables. Do that at setup time instead while the interpreter is alive. Signed-off-by: Paolo Bonzini <[email protected]>
No one is accessing backend.interpreter anymore, get rid of it to avoid future temptations. Signed-off-by: Paolo Bonzini <[email protected]>
763684c
to
7a52310
Compare
dcbaker
approved these changes
Oct 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Most of the time the required information is already present in the environment. For the rest, move it from Interpreter to Build or CoreData. Then the interpreter object does not need to exist past
finalize_postconf_hooks
.Related: #15064