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

[Refactor] Introduce TranslatorContext (2/2) #640

Merged
merged 4 commits into from
Oct 4, 2024

Conversation

czechboy0
Copy link
Contributor

Motivation

Depends on #638, so don't review until that lands.

Continuation of #638, broke up into multiple PRs for easier review.

Also a non-functional change, purely a refactoring.

Modifications

Changed a bunch of TypeMatcher methods from static to being instance methods, which gives them access to the translator context.

Moved a few other methods that depended on the static methods to be extensions on the closest type that already has access to the context.

Result

Now TypeAssigner/TypeMatcher can take runtime configuration, e.g. through feature flags.

Test Plan

All tests still pass.

@simonjbeaumont
Copy link
Contributor

I'll wait until the other PR lands, but will approve it when it's all rebased.

@czechboy0
Copy link
Contributor Author

I'll wait until the other PR lands, but will approve it when it's all rebased.

Okay, ready to go.

@czechboy0 czechboy0 enabled auto-merge (squash) October 4, 2024 13:53
@czechboy0 czechboy0 merged commit f1d7d8b into apple:main Oct 4, 2024
24 checks passed
@czechboy0 czechboy0 deleted the hd-translator-context-2 branch October 4, 2024 15:49
@czechboy0 czechboy0 added the semver/patch No public API change. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants