-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Allow for attribute lookup in rule parsing #16948
Conversation
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.
Awesome! Thanks.
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.
I'm not following what happens with Get(Output, MyType.create())
, which should be Get(Output, MyType, MyType.create())
? That problem kept popping up that people (including me) accidentally wrote it the shorthand way, so we added the nice error message.
raise parse_error( | ||
f"Because you are using the shorthand form {call_node.func.id}(OutputType, " | ||
"InputType(constructor args)), the second argument should be a top-level " | ||
"constructor function call, like `MergeDigest(...)` or `Process(...)`, rather " | ||
"than a method call." |
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.
These error messages get worse, but 🤷♂️ It'll still list the incorrect value and file/line.
You'll get the error complaining how it expected a type.
|
@Eric-Arellano gonna submit, LMK if you think the error is unacceptable and we can fix. |
LG, thanks |
Fixes #16868.
[ci skip-rust]
[ci skip-build-wheels]