During evaluation of codeblocks, we start off with an iteration of nodes, and then while evaluating them we may update the global self.current_node context. When catching and formatting errors, we didn't take into account that the node might be updated from the original top-level iteration. Switch to formatting errors using self.current_node instead, to ensure we can point at the likely most-accurate actual cause of an error. Also update the current node in a few more places, so that function calls always see the function call as the current node, even if the most recently parsed node was an argument to the function call. Fixes #11643pull/11644/head
parent
5fe7ecb861
commit
8fc4649bfe
48 changed files with 53 additions and 50 deletions
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/10 out of bounds/meson.build:4:0: ERROR: Index 0 out of bounds of array of size 0." |
||||
"line": "test cases/failing/10 out of bounds/meson.build:4:6: ERROR: Index 0 out of bounds of array of size 0." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/100 no glib-compile-resources/meson.build:8:0: ERROR: Program 'glib-compile-resources' not found or not executable" |
||||
"line": "test cases/failing/100 no glib-compile-resources/meson.build:8:12: ERROR: Program 'glib-compile-resources' not found or not executable" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/107 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting" |
||||
"line": "test cases/failing/107 no build get_external_property/meson.build:3:14: ERROR: Unknown property for build machine: nonexisting" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/109 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." |
||||
"line": "test cases/failing/109 invalid fstring/meson.build:3:4: ERROR: Identifier \"foo\" does not name a variable." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/110 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" |
||||
"line": "test cases/failing/110 compiler argument checking/meson.build:4:25: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/118 subproject version conflict/meson.build:4:0: ERROR: Subproject B version is 100 but ['1'] required." |
||||
"line": "test cases/failing/118 subproject version conflict/meson.build:4:8: ERROR: Subproject B version is 100 but ['1'] required." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/119 structured source empty string/meson.build:7:0: ERROR: structured_sources: keys to dictionary argument may not be an empty string." |
||||
"line": "test cases/failing/119 structured source empty string/meson.build:9:2: ERROR: structured_sources: keys to dictionary argument may not be an empty string." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/12 string arithmetic/meson.build:3:0: ERROR: The `+` operator of str does not accept objects of type int (3)" |
||||
"line": "test cases/failing/12 string arithmetic/meson.build:3:12: ERROR: The `+` operator of str does not accept objects of type int (3)" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/127 extract from unity/meson.build:4:0: ERROR: Single object files can not be extracted in Unity builds. You can only extract all the object files for each compiler at once." |
||||
"line": "test cases/failing/127 extract from unity/meson.build:4:37: ERROR: Single object files can not be extracted in Unity builds. You can only extract all the object files for each compiler at once." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/13 array arithmetic/meson.build:3:0: ERROR: Object <[ArrayHolder] holds [list]: ['a', 'b']> of type array does not support the `*` operator." |
||||
"line": "test cases/failing/13 array arithmetic/meson.build:3:19: ERROR: Object <[ArrayHolder] holds [list]: ['a', 'b']> of type array does not support the `*` operator." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/16 extract from subproject/meson.build:6:0: ERROR: Tried to extract objects from a different subproject." |
||||
"line": "test cases/failing/16 extract from subproject/meson.build:7:32: ERROR: Tried to extract objects from a different subproject." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/21 subver/meson.build:3:0: ERROR: Subproject foo version is 1.0.0 but ['>1.0.0'] required." |
||||
"line": "test cases/failing/21 subver/meson.build:3:4: ERROR: Subproject foo version is 1.0.0 but ['>1.0.0'] required." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/28 no crossprop/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting" |
||||
"line": "test cases/failing/28 no crossprop/meson.build:3:14: ERROR: Unknown property for host machine: nonexisting" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/30 invalid man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 9" |
||||
"line": "test cases/failing/30 invalid man extension/meson.build:2:5: ERROR: Man file must have a file extension of a number between 1 and 9" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/31 no man extension/meson.build:2:0: ERROR: Man file must have a file extension of a number between 1 and 9" |
||||
"line": "test cases/failing/31 no man extension/meson.build:2:5: ERROR: Man file must have a file extension of a number between 1 and 9" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/32 exe static shared/meson.build:9:0: ERROR: Can't link non-PIC static library 'stat' into shared library 'shr2'. Use the 'pic' option to static_library to build with PIC." |
||||
"line": "test cases/failing/32 exe static shared/meson.build:9:9: ERROR: Can't link non-PIC static library 'stat' into shared library 'shr2'. Use the 'pic' option to static_library to build with PIC." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/39 kwarg assign/meson.build:3:0: ERROR: Tried to assign values inside an argument list." |
||||
"line": "test cases/failing/39 kwarg assign/meson.build:3:30: ERROR: Tried to assign values inside an argument list." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/50 inconsistent comparison/meson.build:5:0: ERROR: Object <[ArrayHolder] holds [list]: []> of type array does not support the `<` operator." |
||||
"line": "test cases/failing/50 inconsistent comparison/meson.build:5:12: ERROR: Object <[ArrayHolder] holds [list]: []> of type array does not support the `<` operator." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/56 link with executable/meson.build:4:0: ERROR: Link target 'prog' is not linkable." |
||||
"line": "test cases/failing/56 link with executable/meson.build:4:4: ERROR: Link target 'prog' is not linkable." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/6 missing incdir/meson.build:3:0: ERROR: Include dir nosuchdir does not exist." |
||||
"line": "test cases/failing/6 missing incdir/meson.build:3:6: ERROR: Include dir nosuchdir does not exist." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/64 dependency not-found and required/meson.build:2:0: ERROR: Dependency is required but has no candidates." |
||||
"line": "test cases/failing/64 dependency not-found and required/meson.build:2:6: ERROR: Dependency is required but has no candidates." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/65 subproj different versions/subprojects/b/meson.build:3:0: ERROR: Dependency 'c' is required but not found." |
||||
"line": "test cases/failing/65 subproj different versions/subprojects/b/meson.build:3:8: ERROR: Dependency 'c' is required but not found." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/66 wrong boost module/meson.build:9:0: ERROR: Dependency \"boost\" not found, tried system" |
||||
"line": "test cases/failing/66 wrong boost module/meson.build:9:10: ERROR: Dependency \"boost\" not found, tried system" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/74 link with shared module on osx/meson.build:8:0: ERROR: target prog links against shared module mymodule. This is not permitted on OSX" |
||||
"line": "test cases/failing/74 link with shared module on osx/meson.build:8:4: ERROR: target prog links against shared module mymodule. This is not permitted on OSX" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/76 subproj dependency not-found and required/meson.build:2:0: ERROR: Neither a subproject directory nor a missing.wrap file was found." |
||||
"line": "test cases/failing/76 subproj dependency not-found and required/meson.build:2:10: ERROR: Neither a subproject directory nor a missing.wrap file was found." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/78 framework dependency with version/meson.build:8:0: ERROR: Dependency lookup for appleframeworks with method 'framework' failed: Unknown version, but need ['>0']." |
||||
"line": "test cases/failing/78 framework dependency with version/meson.build:8:6: ERROR: Dependency lookup for appleframeworks with method 'framework' failed: Unknown version, but need ['>0']." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/8 recursive/subprojects/b/meson.build:3:0: ERROR: Recursive include of subprojects: a => b => a." |
||||
"line": "test cases/failing/8 recursive/subprojects/b/meson.build:3:4: ERROR: Recursive include of subprojects: a => b => a." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/80 gl dependency with version/meson.build:9:0: ERROR: Dependency lookup for gl with method 'system' failed: Unknown version, but need ['>0']." |
||||
"line": "test cases/failing/80 gl dependency with version/meson.build:9:6: ERROR: Dependency lookup for gl with method 'system' failed: Unknown version, but need ['>0']." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/81 threads dependency with version/meson.build:3:0: ERROR: Dependency lookup for threads with method 'system' failed: Unknown version, but need ['>0']." |
||||
"line": "test cases/failing/81 threads dependency with version/meson.build:3:6: ERROR: Dependency lookup for threads with method 'system' failed: Unknown version, but need ['>0']." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/82 gtest dependency with version/meson.build:8:0: ERROR: Dependency 'gtest' is required but not found." |
||||
"line": "test cases/failing/82 gtest dependency with version/meson.build:8:6: ERROR: Dependency 'gtest' is required but not found." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/86 subproj not-found dep/meson.build:2:0: ERROR: Dependency '(anonymous)' is required but not found." |
||||
"line": "test cases/failing/86 subproj not-found dep/meson.build:2:10: ERROR: Dependency '(anonymous)' is required but not found." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/88 kwarg dupe/meson.build:5:0: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." |
||||
"line": "test cases/failing/88 kwarg dupe/meson.build:6:2: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/90 pch source different folder/meson.build:4:0: ERROR: PCH files must be stored in the same folder." |
||||
"line": "test cases/failing/90 pch source different folder/meson.build:4:6: ERROR: PCH files must be stored in the same folder." |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/93 add dict non string key/meson.build:9:0: ERROR: Key must be a string" |
||||
"line": "test cases/failing/93 add dict non string key/meson.build:9:9: ERROR: Key must be a string" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/94 add dict duplicate keys/meson.build:9:0: ERROR: Duplicate dictionary key: myKey" |
||||
"line": "test cases/failing/94 add dict duplicate keys/meson.build:9:27: ERROR: Duplicate dictionary key: myKey" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/95 no host get_external_property/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting" |
||||
"line": "test cases/failing/95 no host get_external_property/meson.build:3:14: ERROR: Unknown property for host machine: nonexisting" |
||||
} |
||||
] |
||||
} |
||||
|
@ -1,7 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/rust/12 bindgen/meson.build:30: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]." |
||||
"line": "test cases/rust/12 bindgen/meson.build:27: WARNING: Project targets '>= 0.63' but uses feature introduced in '1.0.0': \"rust.bindgen\" keyword argument \"include_directories\" of type array[str]." |
||||
} |
||||
] |
||||
} |
||||
|
Loading…
Reference in new issue