-
-
Notifications
You must be signed in to change notification settings - Fork 685
Remove support for Get #23062
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
base: main
Are you sure you want to change the base?
Remove support for Get #23062
Conversation
| class PyGeneratorResponseCall: | ||
| rule_id: str | ||
| output_type: type | ||
| input_types: Sequence[type] |
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.
We no longer access this field on the python side, and in fact only access .inputs in MockCall test infrastructure, so could probably get rid of that too.
| call_node, | ||
| "Expected an `**implicitly(..)` application as the only keyword input.", | ||
| ) | ||
| explanation = self._format( |
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.
This was the only remaining use of GetParseError, so I inlined it here and used a regular ValueError, for simplicity.
| } else if let Ok(get_multi) = response.cast::<PySequence>() { | ||
| // Was an `All` or `concurrently`. | ||
| let gogs = get_multi | ||
| let generators = get_multi |
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.
gog was GetOrGenerator, but now it's always a generator.
| fn interpret_implicit_args( | ||
| py: Python, | ||
| input_arg0: Option<Bound<'_, PyAny>>, | ||
| input_arg1: Option<Bound<'_, PyAny>>, |
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.
The two args were for the input type and instance of that input type, in the case of Get(OutputType, InputType, instance), but this is no longer a thing.
| } | ||
|
|
||
| #[derive(Debug)] | ||
| pub struct Get { |
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.
This is the heart of it...
| /// might use either the call-by-name or `Get` syntax. | ||
| All(Vec<GetOrGenerator>), | ||
| /// immediately produce a `Call`, and then return its value), or async "rule helpers". | ||
| All(Vec<Value>), |
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.
We no longer need GetOrGenerator and can use the generator Value directly.
Delete the bulk of the code needed to
support
Get(andEffect).Follow up changes will further trim code
that is no longer needed, but this
is already a big enough step for now.