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

Adds element annotations to SerialDescriptor derivation #228

Merged
merged 0 commits into from
Aug 16, 2023

Conversation

jackcviers
Copy link
Contributor

Adds ability to add com.xebia.functional.xef.auto.Description annotations to scala classes with derived serializers. Avoids using shapeless-3-deriving because mixed Java and Scala annotations on a class that is subsequently passed to AllAnnotations results in an InstantianitonException at compile-time.

  • Adds com.xebia.functional.xef.auto.WrappedAnnotation to wrap scala annotations retreived at compile time and add to the serial descriptor element annotations list
  • Adds com.xebia.functional.xef.auto.getAnnotations[A: ClassTag] to fetch both scala and java annotations and store them in a Map[String, List[java.lang.annotation.Annotation]] map for retrieval during serial descriptor derivation.
  • Adds com.xebia.functional.xef.auto.getAnnotationsMacro and com.xebia.functional.xef.auto.getAnnotationsImpl to retrieve scala annotations for field members at compile time

Feature suggested by @raulraja in https://fortyseven.slack.com/archives/C051PG86AH0/p1688485085031159?thread_ts=1688413411.157379&cid=C051PG86AH0

diesalbla
diesalbla previously approved these changes Jul 7, 2023
@jackcviers
Copy link
Contributor Author

@diesalbla accepted your changes. Please re-review when the tests are done.

diesalbla
diesalbla previously approved these changes Jul 10, 2023
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.

3 participants