Skip to content
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

Some evaluator simplifications #2138

Merged
merged 16 commits into from
Jun 8, 2024
Merged

Conversation

neunenak
Copy link
Contributor

@neunenak neunenak commented Jun 8, 2024

This PR modifies some of the methods on Evaluator that accept a large number of arguments to instead accept a RecipeContext, which already contains most of those arguments, which allows the call sites to be more concise.

It also deduplicates some of the code around running recipe dependencies, and replaces a mutable variable update with a fold expression.

@casey casey enabled auto-merge (squash) June 8, 2024 13:52
@casey casey disabled auto-merge June 8, 2024 13:52
@casey
Copy link
Owner

casey commented Jun 8, 2024

Nice, this is a good refactor. I took it a step further by just having the RecipeContext (now ExecutionContext, because it's used all over the place) be a field on the evaluator. This required some tweaking, in particular, there was a scope that was created outside a call to the evaluator that is now created inside the evaluator.

@casey casey enabled auto-merge (squash) June 8, 2024 14:40
@casey casey merged commit 4fbd037 into casey:master Jun 8, 2024
5 checks passed
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.

2 participants