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 queued projections #969

Merged

Conversation

adamthom-amzn
Copy link
Contributor

Description of changes:
TransformContext's queued projections were a side effect of transformer
execution, and TransformContext instances were not maintained throughout
projection execution. In particular, BackwardCompatHelper would create a new
instance of TransformContext for its subclasses, but relying on a side effect
of transformation was dangerous in any case.

This adds a new method to ProjectionTransformer that explicitly models
composition of transforms by returning the names of projections to be run
subsequently. It is defaulted to an empty list.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@adamthom-amzn adamthom-amzn requested a review from a team November 2, 2021 19:37
@adamthom-amzn adamthom-amzn force-pushed the refactor-queued-projections branch 3 times, most recently from 5b0da08 to df020ba Compare November 2, 2021 21:14
TransformContext's queued projections were a side effect of transformer
execution, and TransformContext instances were not maintained throughout
projection execution. In particular, BackwardCompatHelper would create a new
instance of TransformContext for its subclasses, but relying on a side effect
of transformation was dangerous in any case.

This adds a new method to ProjectionTransformer that explicitly models
composition of transforms by returning the names of projections to be run
subsequently. It is defaulted to an empty list.
@adamthom-amzn adamthom-amzn force-pushed the refactor-queued-projections branch from df020ba to 3803b7f Compare November 2, 2021 21:42
@adamthom-amzn adamthom-amzn merged commit 0780017 into smithy-lang:main Nov 2, 2021
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