-
Notifications
You must be signed in to change notification settings - Fork 578
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
Boxed OneOfs #1448
Comments
This issue is caused by limitations of JVM, which are enforced by the Jetbrains ASM dependency Java version of generated proto is avoiding this issue by using Builder. Also this issue reminds me of the older one with Java and large proto definitions #691 |
This will affect more than just the For override fun redact(value: FtraceEvent): FtraceEvent = value.copy(..) with override fun redact(value: FtraceEvent): FtraceEvent {
return redact3(redact2(redact1(value)))
}
private fun redact1(value: FtraceEvent): FtraceEvent = value.copy(..)
private fun redact2(value: FtraceEvent): FtraceEvent = value.copy(..)
private fun redact3(value: FtraceEvent): FtraceEvent = value.copy(..) where each method is responsible only for its batch of fields. The hardest one to fix will be the |
I have two things to share
|
Declaration: we won’t support simultaneously using |
Following up on this, the Has there been any movement on having the generator split up that function? If not, I might need to take a stab at it. The good news is that this isn't likely to be an issue with the other generated functions and may only really need to be fixed for edit: implemented in #3214 |
Let’s implement an alternate form of oneof that doesn’t crash the compiler!
readUnknownFields()
callsCONSTANT_CASE
for oneof declarations and their keys@damianw’s original report below:
Wire version: 3.1.0
For example, Perfetto's FtraceEvent generates this Kotlin file. Attempting to compile it (with Kotlin 1.3.70) results in:
The text was updated successfully, but these errors were encountered: