-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Do some normalization of error messages from argument checking #16038
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
Open
dcbaker
wants to merge
18
commits into
mesonbuild:master
Choose a base branch
from
dcbaker:submit/typed-args-normalize
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+303
−328
Open
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
471facd
interpreter: Replace last uses of Feature*Kwargs
dcbaker 57b44b9
interpreterbase/decorators: pull some helpers out of typed_kwargs
dcbaker 85201f6
interpreterbase/decorators: share code between pos and kwarg checking
dcbaker 7e4308f
decorators: share error formatting code between pos and kw arg checking
dcbaker 407cd7a
decorators: normalize quoting of types in errors
dcbaker 4b3dd8b
decorators: make the quoting of types fully standard
dcbaker 263c844
decorators: consistently quote the name of functions in errors
dcbaker 0a9ca80
decorators: Convert KwargInfo to a dataclass
dcbaker 252fd63
decorators: use some `TypeAlias`es to make further changes easier
dcbaker 6ad1137
decorators: allow tuples of types in KWargInfo since_values and depre…
dcbaker ed0ad23
modules/cmake: Use KwargInfo since_values instead of open coding
dcbaker a4c81a7
modules/qt: Use KWargInfo.since_values
dcbaker 86248c5
modules/qt: Use typed_pos_args for qt.preprocess
dcbaker 0ded72e
modules/sourceset: Use KwargInfo.since_values for new types
dcbaker 08187b3
interpreterobjects: move pkgconfig_define FeatureNew to KWargInfo
dcbaker 6f71961
interpreter: Use KWargInfo for some test arguments
dcbaker d6ea643
interpreter/type_checking: consistently quote in_set_validator errors
dcbaker 6821d80
interpreter/type_checking: quote unknown langauge validator error
dcbaker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
4 changes: 2 additions & 2 deletions
4
test cases/common/290 invalid dependency arguments/meson.build
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| project('test', 'c') | ||
|
|
||
| testcase expect_error('executable keyword argument \'dependencies\' was of type array[SubprojectHolder] but should have been array[Dependency | InternalDependency]') | ||
| testcase expect_error('executable keyword argument "dependencies" was of type "array[SubprojectHolder]" but should have been array[Dependency | InternalDependency]') | ||
| executable('main', 'main.c', dependencies: subproject('sub')) | ||
| endtestcase | ||
|
|
||
| lib = static_library('lib', 'lib.c') | ||
|
|
||
| testcase expect_error('executable keyword argument \'dependencies\' was of type array[StaticLibrary] but should have been array[Dependency | InternalDependency]. Tried to use a build_target "lib" as a dependency. This should be in `link_with` or `link_whole` instead.') | ||
| testcase expect_error('executable keyword argument "dependencies" was of type "array[StaticLibrary]" but should have been array[Dependency | InternalDependency]. Tried to use a build_target "lib" as a dependency. This should be in `link_with` or `link_whole` instead.') | ||
| executable('main', 'main.c', dependencies : lib) | ||
| endtestcase |
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
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
2 changes: 1 addition & 1 deletion
2
test cases/failing/111 run_target in add_install_script/test.json
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "stdout": [ | ||
| { | ||
| "line": "test cases/failing/59 string as link target/meson.build:2:0: ERROR: executable keyword argument 'link_with' was of type array[str] but should have been array[BothLibraries | SharedLibrary | StaticLibrary | CustomTarget | CustomTargetIndex | Jar | Executable]" | ||
| "line": "test cases/failing/59 string as link target/meson.build:2:0: ERROR: executable keyword argument \"link_with\" was of type \"array[str]\" but should have been \"array[BothLibraries | SharedLibrary | StaticLibrary | CustomTarget | CustomTargetIndex | Jar | Executable]\"" | ||
| } | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| { | ||
| "stdout": [ | ||
| { | ||
| "line": "test cases/failing/88 custom target install data/meson.build:11:0: ERROR: install_data argument 1 was of type \"CustomTarget\" but should have been one of: \"str\", \"File\"" | ||
| "line": "test cases/failing/88 custom target install data/meson.build:11:0: ERROR: install_data positional argument \"1\" was of type \"CustomTarget\" but should have been one of: \"str\", \"File\"" | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, the quotes are coming back here...