Skip to content

Conversation

gmac
Copy link
Contributor

@gmac gmac commented Sep 9, 2025

Small refactor to the breadth runtime interface... plugs a hole where argument errors were leaking out. This OO interface also feels a bit nicer by keeping the focus on the object scope rather than the runtime.

So – in the object sequence spanning evaluate_selection ... evaluate_selection_with_resolved_keyword_args, we basically just need to offer all values to selection_result.collect_result prior to calling continue_value. Seem reasonable?

end

# hook for breadth-first implementations to signal when collecting results.
def collect_result(result_name, result_value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? for predicate method?

Suggested change
def collect_result(result_name, result_value)
def collect_result?(result_name, result_value)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you skipped it because it can have side effects. Probably better as is 👍

@rmosolgo rmosolgo added this to the 2.5.12 milestone Sep 10, 2025
@rmosolgo rmosolgo merged commit 59c31b8 into rmosolgo:master Sep 10, 2025
15 checks passed
@gmac gmac deleted the gmac--refactor-breadth-interface branch September 10, 2025 12:01
@gmac gmac restored the gmac--refactor-breadth-interface branch September 10, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants