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

Use FQNs in rendered Product and Serializable inheritance #63

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

Baccata
Copy link
Contributor

@Baccata Baccata commented Jan 21, 2022

Using full-qualified-names because users encounter issues when they use Product as a shape name.

@@ -460,7 +460,7 @@ private[codegen] class Renderer(compilationUnit: CompilationUnit) { self =>
values: List[EnumValue],
hints: List[Hint]
): RenderResult = lines(
s"sealed abstract class $name(val value: String, val ordinal: Int) extends Product with Serializable",
s"sealed abstract class $name(val value: String, val ordinal: Int) extends scala.Product with scala.Serializable",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general thought, should we do the same for collections? I imagine a type like Vector might appear in users' smithy files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that should be default behaviour, but maybe we'll add that as an option to the rendering

@Baccata Baccata merged commit 4bb5a65 into main Jan 21, 2022
@Baccata Baccata deleted the fqn-product-serializable branch January 21, 2022 15:26
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