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

Update TraitCodegenWriter #2255

Merged
merged 2 commits into from
Apr 22, 2024
Merged

Conversation

hpmellema
Copy link
Contributor

Background

Updates the trait codegen writer to:

  1. Use a static factory class
  2. Add a CapitalizingFormatter formatter for $U
  3. Normalize symbol references before adding to duplicate map to avoid false positive duplicates (for example Map<String, String> and Map<String, Integer> would currently be marked as duplicates because their references differ, causing the Map class to use a fully qualified name unnecessarily)
  4. Put resolved placeholder values directly into context map rather than instantiating a second hashmap.

Testing

  • Ran existing integration and unit tests

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

@hpmellema hpmellema requested a review from a team as a code owner April 22, 2024 20:48
@hpmellema hpmellema requested a review from sugmanue April 22, 2024 20:48
@hpmellema hpmellema merged commit 507eeb0 into smithy-lang:main Apr 22, 2024
13 checks passed
@hpmellema hpmellema deleted the update-tcg-writer branch April 22, 2024 21:37
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.

None yet

2 participants