Skip to content

Remove Kotlin specific client API generation. #166

Merged
paulbakker merged 4 commits intomasterfrom
remove-kotlin-client
Jun 14, 2021
Merged

Remove Kotlin specific client API generation. #166
paulbakker merged 4 commits intomasterfrom
remove-kotlin-client

Conversation

@paulbakker
Copy link
Collaborator

Kotlin now uses the client generator from Java, since there is no benefit in having this Kotlin specific. Also removed the .toString implementations for input types that were previously used by the DGS client to serialize input values. The DGS client now takes care of the serialization, so this code was no longer being used.

This should be released as a major release. Although I don't expect major differences, there might be subtle differences in how the Kotlin client APIs used to be generated vs the Java client now, which could potentially break user code.

The reason for this change is to simplify maintenance. Each change had to be implemented twice, once for Java and once for Kotlin. This is obviously very time-consuming and has often resulted in bugs. There were not really any benefits to having a Kotlin specific client API, because both Java and Kotlin were using the same builder style API.

Note that Kotlin generation for data types etc. remains unchanged! There are more clear benefits to doing this because we can use data classes.

The toSring implementation for input types was removed because it has been made obsolete by the new serialization implementation in the DGS Client: Netflix/dgs-framework#333
Although we could have left the code for "other" (unknown) use cases, we choose to remove it to reduce maintenance cost. The implementation was hard to maintain and often a source for bugs.

…ent generator from Java, since there is no benefit in having this Kotlin specific. Also removed the .toString implementations for input types that was previously used by the DGS client to serialize input values. The DGS client now takes care of the serialization, so this code was no longer being used.
@paulbakker
Copy link
Collaborator Author

As an unrelated change I've added a fix for #131 to this branch.

@srinivasankavitha
Copy link
Contributor

Very cool!

@paulbakker paulbakker merged commit 00909db into master Jun 14, 2021
@paulbakker paulbakker deleted the remove-kotlin-client branch June 14, 2021 19:48
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