Remove Kotlin specific client API generation. #166
Merged
paulbakker merged 4 commits intomasterfrom Jun 14, 2021
Merged
Conversation
…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.
berngp
approved these changes
Jun 11, 2021
Collaborator
Author
|
As an unrelated change I've added a fix for #131 to this branch. |
srinivasankavitha
approved these changes
Jun 14, 2021
Contributor
|
Very cool! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.