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

AWSVerifiedPermissions service fails to compile #1047

Closed
jbelkins opened this issue Jun 21, 2023 · 2 comments
Closed

AWSVerifiedPermissions service fails to compile #1047

jbelkins opened this issue Jun 21, 2023 · 2 comments
Assignees
Labels
bug This issue is a bug.

Comments

@jbelkins
Copy link
Contributor

Describe the bug

The AWSVerifiedPermissions service, which was introduced after AWS SDK release 0.18.0, includes a struct property named set. set is also a reserved word in Swift.

The serialization extension for that struct tries to escape `set` in backticks, then combine it with the suffix Container, which results in an invalid Swift identifier and a compile error.

/Users/runner/work/aws-sdk-swift/aws-sdk-swift/Sources/Services/AWSVerifiedPermissions/models/Models.swift:136:18: error: found an unexpected second identifier in constant declaration; is there an accidental break?
        let `set`Container = try values.decodeIfPresent([VerifiedPermissionsClientTypes.AttributeValue?].self, forKey: .`set`)
                 ^

Expected Behavior

Swift compiles correctly.

(More specifically, the generated Swift identifier should be setContainer with nothing backticked.)

Current Behavior

Swift compiles with the error identified above.

Reproduction Steps

Generate Swift code from latest models
Compile SDK including the AWSVerifiedPermissions service.

Possible Solution

Fix generation of symbols from Swift reserved words.

Additional Information/Context

No response

AWS SWIFT SDK version used

main / latest

Compiler and Version used

Xcode 14.3.1

Operating System and version

macOS 13.3

@jbelkins jbelkins added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 21, 2023
@jbelkins
Copy link
Contributor Author

Release 0.19.0 will be performed excluding this service. Once this work is complete, that service may be re-included in the next release.

@jbelkins jbelkins self-assigned this Jun 21, 2023
@jbelkins jbelkins removed the needs-triage This issue or PR still needs to be triaged. label Jun 21, 2023
@jbelkins
Copy link
Contributor Author

jbelkins commented Jul 3, 2023

Re-enabled & shipped in AWS SDK for Swift 0.20.0

@jbelkins jbelkins closed this as completed Jul 3, 2023
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

No branches or pull requests

1 participant