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

AvroType macro shouldn't generate duplicate record classes fix #2264) #2267

Merged
merged 2 commits into from Oct 1, 2019

Conversation

clairemcginty
Copy link
Contributor

fix #2264

val recordClasses = f
.flatMap(_._2)
.groupBy(_.asInstanceOf[ClassDef].name)
.map { case (_, cDefs) => cDefs.head } // Don't generate duplicate case classes
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that if there are conflicting definitions of a nested record type, the Avro schema parser itself will catch it before getting to this step.

@nevillelyh nevillelyh merged commit 9b0890d into master Oct 1, 2019
@nevillelyh nevillelyh deleted the claire/reuse_avro_types branch October 1, 2019 16:39
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.

Avro regenerates referenced definitions
2 participants