-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
meson introspect
can hang in some cases
#11763
Comments
The culprit is Minimal example to reproduce:
|
Similar problem occurs when performing a plusassignment. In |
For example,
results in
|
Incidentally, the rewriter will work, because it will only alter the last assignment, but it can result in a duplicated source file because it doesn't know about previous assignments, and it will hang in an infinite loop with the first example. |
If you replace
|
This is an issue with IDEs like KDevelop and Qt Creator which do it that way. |
@Volker-Weissmann , indeed, that's a workaround to side-step this bug. The ticket's purpose is specifically to point out the bug exactly as specified in the reproduction steps to help the developers reproduce and fix it (not to work-around it). |
Introspecting a build directory doesn't provide AST information about the meson.build files, so it isn't a workaround so much as doing something else entirely. ...
poking around a bit: meson/mesonbuild/ast/introspection.py Lines 242 to 269 in a8b144b
files() is not an elementary node, so the value of
Since this is an IdNode, we look up
This is where we get stuck, because the FunctionNode is pointing at the second assignment to Not sure what the good solution here is. One option might be to hoist some code out of resolve_node, which already has a loop detector. |
To avoid duplicate work, please be informed that I'm currently working on it, fix will (hopefully) come this week. |
Awesome, I wasn't working on it at all beyond the analysis I documented above. |
While fixing this bug I found quite a lot of limitations/bugs in the meson rewriter. I think I'll rewrite some major parts of the rewriter. |
…tool The rewriter and the static introspection tool used to be very broken, now it is *less* broken. Fixes mesonbuild#11763
…tool The rewriter and the static introspection tool used to be very broken, now it is *less* broken. Fixes mesonbuild#11763
…tool The rewriter and the static introspection tool used to be very broken, now it is *less* broken. Fixes mesonbuild#11763
The rewriter and the static introspection tool used to be very broken, now it is *less* broken. The most important changes are: 1. We now have class UnknownValue for more explicit handling of situations that are too complex/impossible. 2. If you write ``` var = 'foo' name = var var = 'bar' executable(name, 'foo.c') ``` the tool now knows that the name of the executable is foo and not bar. See dataflow_dag and node_to_runtime_value for details on how we do this. Fixes mesonbuild#11763
The rewriter and the static introspection tool used to be very broken, now it is *less* broken. The most important changes are: 1. We now have class UnknownValue for more explicit handling of situations that are too complex/impossible. 2. If you write ``` var = 'foo' name = var var = 'bar' executable(name, 'foo.c') ``` the tool now knows that the name of the executable is foo and not bar. See dataflow_dag and node_to_runtime_value for details on how we do this. Fixes mesonbuild#11763
The rewriter and the static introspection tool used to be very broken, now it is *less* broken. The most important changes are: 1. We now have class UnknownValue for more explicit handling of situations that are too complex/impossible. 2. If you write ``` var = 'foo' name = var var = 'bar' executable(name, 'foo.c') ``` the tool now knows that the name of the executable is foo and not bar. See dataflow_dag and node_to_runtime_value for details on how we do this. Fixes mesonbuild#11763
@Volker-Weissmann did you finally fixed this bug? |
Yes: It is waiting for review, then I will squash the commits and we can merge. |
The rewriter and the static introspection tool used to be very broken, now it is *less* broken. The most important changes are: 1. We now have class UnknownValue for more explicit handling of situations that are too complex/impossible. 2. If you write ``` var = 'foo' name = var var = 'bar' executable(name, 'foo.c') ``` the tool now knows that the name of the executable is foo and not bar. See dataflow_dag and node_to_runtime_value for details on how we do this. Fixes mesonbuild#11763
Describe the bug
When fed DOSBox Staging's meson.build file,
meson introspect
hangs.To Reproduce
Expected behavior
Printing of the project information to stdout, in JSON format.
system parameters
meson --version
: 1.1.0Thanks to @GranMinigun for flagging this via IRC.
The text was updated successfully, but these errors were encountered: