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

Make when expression non exhaustive in EndpointBuiltInsDecorator.kt #3634

Merged
merged 1 commit into from
May 9, 2024

Conversation

ysaito1001
Copy link
Contributor

Motivation and Context

Updates handling matching on endpoint parameter type in EndpointBuiltInsDecorator.kt

Description

Smithy 1.48.0 will introduce ParameterType.STRING_ARRAY for the endpoint parameter type and exhaustive matching like what we have today makes lint unhappy.

codegen/src/main/kotlin/software/amazon/smithy/rustsdk/EndpointBuiltInsDecorator.kt: (113, 9): 'when' expression must be exhaustive, add necessary 'STRING_ARRAY' branch or 'else' branch instead 

For now, we will fail out loud for anything other than string or boolean since we most likely don't have services that support ParameterType.STRING_ARRAY today. The panic will let us know during internal preview when a service supports ParameterType.STRING_ARRAY.

Testing

Relies on tests in CI


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

github-actions bot commented May 8, 2024

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001 ysaito1001 marked this pull request as ready for review May 8, 2024 18:51
@ysaito1001 ysaito1001 requested a review from a team as a code owner May 8, 2024 18:51
@ysaito1001 ysaito1001 added this pull request to the merge queue May 9, 2024
Merged via the queue into main with commit 14ccc50 May 9, 2024
44 checks passed
@ysaito1001 ysaito1001 deleted the ysaito/make-when-expression-non-exhaustive branch May 9, 2024 15:23
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