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

fix: Remove backticks from reserved words before adding an identifier suffix #566

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

jbelkins
Copy link
Contributor

@jbelkins jbelkins commented Jun 21, 2023

Issue #

awslabs/aws-sdk-swift#1047

Description of changes

The newly-added AWSVerifiedPermissions service includes a structure with a property named set. Since set is a Swift reserved word, our symbol generator wraps the name in backticks for use in generated Swift code.

In the section that creates encoders/decoder methods, our code-generation tries to name a local variable by simply appending Container to the property name. If the backticks aren't removed before appending, this causes a compile error because `set`Container is not a valid Swift identifier.

To remedy, the places where an identifier is created from a property name have been modified to remove surrounding backticks first.

(also: Update dokka to 1.4.30, previous version 1.4.20 does not seem to resolve)

Scope

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

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

@jbelkins jbelkins requested a review from waahm7 June 21, 2023 20:05
@jbelkins jbelkins added this to the GA milestone Jun 21, 2023
@jbelkins jbelkins self-assigned this Jun 21, 2023
@jbelkins jbelkins added the bug This issue is a bug. label Jun 21, 2023
@jbelkins jbelkins merged commit fa4c779 into main Jun 22, 2023
7 checks passed
@jbelkins jbelkins deleted the jbe/fix_reserved_word_properties branch June 22, 2023 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants