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

Provide a mechanism for dumping schemas of all events (and transitively included classes) #31

Closed
PawelLipski opened this issue May 10, 2021 · 3 comments · Fixed by #37
Closed
Assignees
Labels
event/state compatibility Relates to maintaining compatibility of akka-persistence events/state HIGH PRIORITY Should be picked up first

Comments

@PawelLipski
Copy link
Collaborator

Related to #28.

This would be priceless for detecting (esp. inadvertent) changes in events for the given PR in CI pipeline.

Possibly one of the serializers (kryo? borer?) already provides this functionality - pls research.

If not, then let's consider a Scala compiler plugin again (it could even just extract Scala source code of events and transitively included classes from the codebase).

@PawelLipski PawelLipski added HIGH PRIORITY Should be picked up first event/state compatibility Relates to maintaining compatibility of akka-persistence events/state labels May 10, 2021
@PawelLipski PawelLipski changed the title Provide a mechanism for dumping schemas of all events Provide a mechanism for dumping schemas of all events (and transitively included classes) May 11, 2021
@MarconZet
Copy link
Collaborator

MarconZet commented May 11, 2021

I have researched Kryo and Borer. Kryo does everything at runtime. As expected, it doesn't know anything about classes it will serialise. Borer also doesn't keep its information in a central place. It's impossible to collect all codecs with certainty.

@MarconZet
Copy link
Collaborator

@PawelLipski
Maybe instead of compiler plugin, sbt task would be more appropriate? Either way, I doubt we can do it with something else than the compiler plugin (or maybe custom compiler, like the one in checker-plugin/test?), as we at least need AST to traverse through (which can be achieved with ANTLR, but that would be too much of a hassle).

@PawelLipski
Copy link
Collaborator Author

Ok! Leaving the details (compiler plugin/sbt task) up to you... if none of the existing serializers provides an easy way to extract the schemas, let's then make the schema dumper completely independent from what serializer has been used (just as akka-serializability-checker is)

@MarconZet MarconZet linked a pull request May 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event/state compatibility Relates to maintaining compatibility of akka-persistence events/state HIGH PRIORITY Should be picked up first
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants