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

Adding utils to help ensure that compile time schema ~ runtime schema #767

Merged
merged 1 commit into from
Jul 5, 2024

Conversation

koperagen
Copy link
Collaborator

No description provided.

@koperagen koperagen added this to the 0.14.0 milestone Jul 4, 2024
@koperagen koperagen self-assigned this Jul 4, 2024
data class Group(val id: String, val participants: List<Person>) : DataRowSchema

@Test
fun `deeply convert data schema and list of data schema`() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it worth to compare here, for example, a circular references?

Group depends on Person, Person depends on Group

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I started working on this PR with this circular reference idea in mind. Because regular Kotlin object can have them quite easily. But since we ended up converting only DataSchema objects deeply, i think it's not an issue anymore. You really need to do it on purpose to have a cycle between DataSchema objects. So i think it's not worth to bother here

Copy link
Contributor

github-actions bot commented Jul 5, 2024

Generated sources will be updated after merging this PR.
Please inspect the changes in here.

@koperagen koperagen merged commit fda36bb into master Jul 5, 2024
5 checks passed
@koperagen koperagen deleted the compile-time-schema branch August 26, 2024 13:47
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.

2 participants