Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
there are some image for help
el...@google.com <el...@google.com>
na...@google.com <na...@google.com> #3
hello?
sp...@gmail.com <sp...@gmail.com> #4
I'm seeing this with Room 2.7.0-alpha13.
e: [ksp] java.lang.IllegalArgumentException: not a valid name: update--rkJvpU
at com.squareup.javapoet.Util.checkArgument(Util.java:53)
at com.squareup.javapoet.MethodSpec$Builder.setName(MethodSpec.java:315)
at com.squareup.javapoet.MethodSpec$Builder.<init>(MethodSpec.java:310)
at com.squareup.javapoet.MethodSpec$Builder.<init>(MethodSpec.java:294)
at com.squareup.javapoet.MethodSpec.methodBuilder(MethodSpec.java:188)
at androidx.room.compiler.processing.MethodSpecHelper.overriding(JavaPoetExt.kt:183)
at androidx.room.compiler.processing.MethodSpecHelper.overridingWithFinalParams(JavaPoetExt.kt:149)
at androidx.room.compiler.codegen.XFunSpec$Companion.overridingBuilder(XFunSpec.kt:166)
at androidx.room.compiler.codegen.XFunSpec$Companion.overridingBuilder$default(XFunSpec.kt:158)
at androidx.room.writer.DaoWriter.overrideWithoutAnnotations(DaoWriter.kt:680)
at androidx.room.writer.DaoWriter.createPreparedQueryFunction(DaoWriter.kt:435)
at androidx.room.writer.DaoWriter.createTypeSpecBuilder(DaoWriter.kt:154)
at androidx.room.writer.TypeWriter.write(TypeWriter.kt:70)
at androidx.room.DatabaseProcessingStep.process(DatabaseProcessingStep.kt:103)
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Daniel Santiago Rivera <
Link:
Sanitize DAO Java method names mangled by value classes.
Expand for full commit details
Sanitize DAO Java method names mangled by value classes.
Bug: 384600605
Bug: 388299754
Test: DaoKotlinCodeGenTest.kt
Change-Id: I805ae6828bf45de82f4bcec55af4528ccd16d00a
Files:
- M
room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/util/NamingUtils.kt
- M
room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
- M
room/room-compiler/src/test/test-data/kotlinCodeGen/dataClassRowAdapter_valueClassConverter.kt
Hash: 93666e398595454b46279c8ea2b8e746363971eb
Date: Wed Jan 29 15:54:02 2025
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.core:core-viewtree:1.0.0-rc01
androidx.room:room-compiler:2.7.0-beta01
androidx.room:room-compiler-processing:2.7.0-beta01
Description
With the changes for XPoet to build both JavaPoet and KotlinPoet specs it means that when Room is processing function that lead to invalid JVM method names, it will cause the JavaPoet side to throw an exception even if the
XProcessingConfig.excludeMethodsWithInvalidJvmSourceNames
is turned ON for Kotlin code generation.An example case where Room will encounter these is with
internal
functions that it needs to override.