-
Notifications
You must be signed in to change notification settings - Fork 14
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
drop-in compatibility adjustments #210
drop-in compatibility adjustments #210
Conversation
(protokt.v1.property).wrap = "java.net.InetAddress" | ||
]; | ||
|
||
bytes address = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to wrap this if the outer type is going to be wrapped. (Plus, it won't compile on Kotlin JS.)
@@ -75,26 +73,12 @@ private class MessageGenerator( | |||
.addMember(msg.fullProtobufTypeName.embed()) | |||
.build() | |||
) | |||
handleDeprecatedKtGeneratedMessage() | |||
// put this back when handleDeprecatedKtGeneratedMessage() is removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just suppress deprecation on every file we generate.
|
||
// do not generate DefaultImpls objects since we do not target < JVM 1.8 | ||
// https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces | ||
freeCompilerArgs = listOf("-Xjvm-default=all") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Article states this will eventually be the default.
import protokt.v1.google.protobuf.StringValue | ||
import java.time.LocalDate | ||
|
||
@AutoService(Converter::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this work now?
@@ -0,0 +1,9 @@ | |||
protokt.v1.DurationConverter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see
maybe we can use KSP to generate this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. Project for another time.
- bump copied generated code to 0.12.1, the last version that had the old package names (includes KtGeneratedFileDescriptor annotation) - remove old protokt.proto file so that buf is happy that only one file has the protokt extension number - consolidate jvm extensions modules into multiplatform modules (puts files back in those JARs that were there before the 1.0 reorganization) - rename protokt outer class to be consistent with protobuf-java - remove kotlin-reflect from dependencies of protokt-core - remove interop between old and new generated code, as it is not needed for old generated code to function with the new runtime - undo manual adjustments to copied generated code as part of the above - kapt in multiplatform modules fails with: /Users/.../protokt/extensions/protokt-extensions-simple/build/tmp/kapt3/stubs/main/com/toasttab/protokt/ext/LocalDateStringConverter.java:3: error: incompatible types: NonExistentClass cannot be converted to Annotation @error.NonExistentClass(). Not sure what's up.
/Users/.../protokt/extensions/protokt-extensions-simple/build/tmp/kapt3/stubs/main/com/toasttab/protokt/ext/LocalDateStringConverter.java:3: error: incompatible types: NonExistentClass cannot be converted to Annotation @error.NonExistentClass()
. Not sure what's up.