Skip to content

Conversation

@benjyw
Copy link
Contributor

@benjyw benjyw commented Jan 31, 2026

Delete the bulk of the code needed to
support Get (and Effect).

Follow up changes will further trim code
that is no longer needed, but this
is already a big enough step for now.

@benjyw benjyw added the release-notes:not-required [CI] PR doesn't require mention in release notes label Jan 31, 2026
@benjyw benjyw requested review from sureshjoshi and tdyas January 31, 2026 23:40
class PyGeneratorResponseCall:
rule_id: str
output_type: type
input_types: Sequence[type]
Copy link
Contributor Author

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(
Copy link
Contributor Author

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
Copy link
Contributor Author

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>>,
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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>),
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes:not-required [CI] PR doesn't require mention in release notes

3 participants