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

Add helper to convert Symbol to SymbolReference #1220

Merged
merged 2 commits into from
May 16, 2022

Conversation

mtdowling
Copy link
Member

Issue #, if available:

Description of changes:

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

@mtdowling mtdowling requested a review from a team as a code owner May 12, 2022 02:59
@mtdowling mtdowling force-pushed the add-symbol-to-reference-method branch from 23fc27e to 999d798 Compare May 12, 2022 21:21
It's sometimes necessary to obsfuscate names and use aliases in symbols
that refer to other symbols. Using a SymbolReference could work here,
but not if you need to wire it up to a SymbolProvider. These two helper
methods create a Symbol that uses an alias as its name, no namespace,
and adds a reference to the original symbol.

It's essentially a helper method to do what things like the Smithy
TypeScript generator are already doing in their symbol providers when
referring to built-in language types that could conflict with Smithy
generated types.
@mtdowling mtdowling force-pushed the add-symbol-to-reference-method branch from 999d798 to 4880500 Compare May 13, 2022 22:22
@mtdowling mtdowling requested a review from gosar May 13, 2022 22:22
@mtdowling mtdowling merged commit 6ca9d1f into main May 16, 2022
@mtdowling mtdowling deleted the add-symbol-to-reference-method branch June 13, 2022 05:06
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.

4 participants