Status Update
Comments
ca...@gmail.com <ca...@gmail.com> #2
Thank you for posting.
For further checking, kindly provide the expected exact location/coordinate of the provided address Lot 19 1RN, Mosa, Middlesex, ON, CA
.
yb...@google.com <yb...@google.com> #3
the totally *irrelevant* responses that geocoder returns. Why does the
Maps application understand that Camden is a township in Kent county, but
the geocoder gives me CAMDEN, DELAWARE, USA! When I look for similar
locations in Michigan I always get a meaningful response. It does not
throw in a location with a similar name in FRANCE!
I am not fussy about the exact location/coordinates returned as long as it
is in the vicinity. If you choose to ignore leading parts that you do not
understand until you find something in your database that is meaningful,
fine by me. Why, when I have supplied both a valid township and county
name do you sometimes return only the County as a response. And sometimes
when I ask about a location in Canada the very first result is the STATE OF
CALIFORNIA!
The Google geocoder handles urban addresses, but not rural addresses.
Rural properties in both Canada and the United States are generally
identified by lot, concession, and township, like this example. In the
case of Mosa township street names and numeric addresses were only added
about 20 years ago in order to facilitate fire department service, because
these locations are serviced by the Canadian equivalent of RFD. 1st Range
North of Longwoods Road in Mosa township
<
Middlesex county, Ontario is such a concession. I have provided a link to
the record in my database that describes that concession. I believe that
you are entitled by the contract that I have for the use of your API to
copy any location and boundary information that I have added for a
location. I have even provided an alternative interface by which you can
obtain this information as a JSON document
tool is documented at
example to get all locations in my database that contain the string '1RN,
Mosa' ask for
I am not expecting you to return a perfect response. For example if
geocoder had returned your record for all of Mosa township, I would have
been happy. But instead in most cases with this sort of location I get
either the whole county, or the province of Ontario, or the STATE OF
CALIFORNIA!
The ideal response to my request for the specific location is
.
As I indicated I understand that you are entitled to copy any additional
information that I have accumulated using your geocoder and Maps
interfaces. It is fine with me if others benefit. There are almost 30,000
locations in my database.
On Mon, 18 Dec 2023 at 01:30, <buganizer-system@google.com> wrote:
--
James Cobban jamesalancobban@gmail.com
911-500 Springbank Dr,
London, ON, CANADA
N6J 4G6
1-226-504-7603
ca...@gmail.com <ca...@gmail.com> #4
island of South Uist, in the Outer Hebrides, which is administered as part
of the county of Invernessshire in Scotland. No matter what I entered into
geocoder it kept returning the the ENTIRE COUNTY OF INVERNESSSHIRE. This
is not a helpful response. I was forced to waste time looking up Bornish
south uist on Google Maps and then copy and paste the coordinates from the
URL. Please fix this!
On Mon, 18 Dec 2023 at 01:30, <buganizer-system@google.com> wrote:
--
James Cobban jamesalancobban@gmail.com
911-500 Springbank Dr,
London, ON, CANADA
N6J 4G6
1-226-504-7603
sl...@gmail.com <sl...@gmail.com> #5
Thank you for the information.
Please note that there are many reasons why Geocoding returns the incorrect/unexpected result like when the data is not available on our end or the data is problematic. This is why we are requesting users to provide additional information like the sample of the request where the issue is encountered with the expected correct result including the official source that can validate that it is correct.
Another reason for inaccurate results can be because of the request itself like when there are ambiguous or incorrect addresses. For this, kindly visit and check
sl...@gmail.com <sl...@gmail.com> #6
code. My code worked fine with the geocoder v3.4 interface. It always
gave me a useful answer. You then started WHINING that I was accessing an
obsolete interface and demanded that I upgrade to the current interface.
You then *BROKE* the geocoder interface, from my point of view explicitly
to force me to rewrite all of my code to some NEW service which you are
springing on me! I do not appreciate your laying the blame for this
problem on your customers! Why should I have to *rewrite* all of my code
just because you invented a new product?
Please fix your geocoder interface rather than force me to rewrite all of
my code!
I demand an apology and an assurance that you are not going to avoid
treating your customers in this shady manner.
On Thu, 21 Dec 2023 at 02:00, <buganizer-system@google.com> wrote:
--
James Cobban jamesalancobban@gmail.com
911-500 Springbank Dr,
London, ON, CANADA
N6J 4G6
1-226-504-7603
sl...@gmail.com <sl...@gmail.com> #7
let url = "
`?input=${locn}` +
`&types=(regions)` +
`&key=${googleKey}`;
let options = {}; // are there other
headers I should be sending?
options.errorHandler = function() {alert('script Google Places
Autocomplete not found')}; // this alert always pops
HTTP.get(url, // this is the AJAX library from
"Javascript: the Definitive Guide" by David Flanagan
gotLocs,
options);
but this is rejected by my Firefox browser as a "Cross-Origin Request
Blocked: The Same Origin Policy disallows reading the remote resource at
<
(Reason: CORS header 'Access-Control-Allow-Origin' missing). Status code:
200."
I do not understand all of the description of this error, but it seems for
me to send a request to
'Access-Control-Allow-Origin' header from your site. I am using the same
client key that I use for geocoder from My Project 64975. What do I have
to do to get you to send that header?
I have enabled the Places API in Google. Still doesn't work and contrary
to the explanation I do not see the Places API in my dashboard.
This would seem to me to be a very common error but I cannot find ANY WEB
SITE that even mentions it.
On Thu, 21 Dec 2023 at 02:00, <buganizer-system@google.com> wrote:
--
James Cobban jamesalancobban@gmail.com
911-500 Springbank Dr,
London, ON, CANADA
N6J 4G6
1-226-504-7603
yb...@google.com <yb...@google.com> #8
a JSON response, but that JSON response is useless if I cannot process it
in my Javascript code. I have to be able to make requests from my
JavaScript code, which is running on my web server at 23.111.69.250. I DO
NOT WANT YOUR PLACES LIBRARY. Is there some configuration tool to
authorize these requests? I have read through the Identity and Access
Management API and I am completely baffled as to whether it will permit me
to include an authentication token in my requests.
On Thu, 21 Dec 2023 at 02:00, <buganizer-system@google.com> wrote:
--
James Cobban jamesalancobban@gmail.com
911-500 Springbank Dr,
London, ON, CANADA
N6J 4G6
1-226-504-7603
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit b604ea36c846512e141f0af5c0e31096335813b7
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Aug 10 10:06:19 2022
Generate AutoMigration in Kotlin
The first baby steps for generating Kotlin code in Room.
* Add a processor option, 'room.generateKotlin' that when enabled will cause Room to generate Kotlin code instead of Java. For now only auto migrations are generated in Kotlin but slowly the rest of the code will be converted.
* Add XProcessing APIs that mirror JavaPoet / KotlinPoet so that code generation logic is shared.
* XPoet will have common functionality, such as declaring a local variable, adding a method, etc. It does provide a 'backdoor' API that exposes the JavaPoet and KotlinPoet code blocks for situations when the generated code diverges too much.
* XPoet right now relies on JavaPoet TypeNames but this will change in a follow-up CL.
* XPoet uses KotlinPoet placeholder syntax (%) instead of JavaPoet ($)
Bug: 127483380
Test: AutoMigrationWriterTest
Change-Id: Ifbdf5a3a3456a3bffdceb04d9d4b173713615e45
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinAnnotationSpec.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XFiler.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/PoetExt.kt
A room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/kotlin/androidx/room/util/SchemaDifferTest.kt
M room/room-compiler-processing/build.gradle
M room/room-compiler/src/test/kotlin/androidx/room/writer/AutoMigrationWriterTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
A room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithDefault.java
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/build.gradle
A room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinLang.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/VisibilityModifier.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaLang.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XAnnotationSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/AutoMigrationWithProvidedSpec.java
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaAnnotationSpec.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/CodeLanguage.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/ClassNames.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithoutDefault.java
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
D room/room-compiler/src/test/test-data/autoMigrationWriter/output/ValidMultiColumnRename.java
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
A room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
ap...@google.com <ap...@google.com> #10
Branch: androidx-main
commit 587c02190b130f440c2ebde859eb5ba46aa62241
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sat Sep 17 12:55:48 2022
Create an XTypeName for XProcessing and XPoet
Create a xprocessing type name that wraps JavaPoet and KotlinPoet type names. The KotlinPoet name will only be available in KSP, for Javac and KAPT the name will be UNAVAILABLE, the reasoning is that only in KSP will Kotlin code will be generated as it contains the best type information.
* XPoet APIs are migrated to take XTypeName instead of JavaPoet type name.
* For now KSP KotlinPoet name building logic is copied from JavaPoet's version.
Migration and deprecation of JavaPoet as API in xprocessing will be done in follow-up CLs along with any test that verifies JavaPoet name will also verify KotlinPoet name.
Bug: 127483380
Test: XArrayType and a bit in XTypeElement
Change-Id: I76f0afbdb2a2fc6fa50c930ccc0fd7d50b998197
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinAnnotationSpec.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/PoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XFiler.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/JavaPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspArrayType.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspPrimitiveType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KSTypeKotlinPoetExt.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KSTypeJavaPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XAnnotationSpec.kt
A room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/PoetTestExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XType.kt
D room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/JavaPoetTestExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaAnnotationSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XArrayTypeTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/AutoMigration.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/DefaultKspType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspVoidType.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KSTypeExtTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeArgumentType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KSTypeExt.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KTypeVariableNameFactory.java
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/ClassNames.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacArrayType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacType.kt
ap...@google.com <ap...@google.com> #11
Branch: androidx-main
commit fe98c7071a794803f016fb2681dbef15db26f6e2
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Sep 22 22:58:50 2022
Migrate remaining implementations of ClassWriter to TypeWriter.
* This change moves all Room writers that defined a TypeSpec to TypeWriter which uses XPoet.
* TypeWriter is not fully migrated though, shared fields and methods need to be converted to XPoet.
* This change also migrates CodeGenScope to use XPoet but keeps the compatibility `builder(): JCodeBlockBuilder` function that will slowly be migrated and eventually the function removed.
Bug: 127483380
Test: ./gradlew :room:room-compiler:test
Change-Id: I49f0f92e63e41d263f3fc255455ed5e1e046ac9b
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/EntityCursorConverterWriterTest.kt
D room/room-compiler/src/main/kotlin/androidx/room/writer/ClassWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/BasicColumnTypeAdaptersTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableInsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableUpsertMethodBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/CodeGenScope.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/NullabilityAwareTypeConverterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DefaultsInDaoTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Database.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorMethodWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
ap...@google.com <ap...@google.com> #12
Branch: androidx-main
commit 2326b4305e143a128a5da9db65e18805809f9809
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Sep 22 12:15:21 2022
Migrate XProcessing to XTypeName
This changes migrates most of the usages of room-compiler-processing to XTypeName along with a vast majority of tests which further asserts on the correctness of KotlinPoet name creation in KSP.
Bug: 127483380
Test: ./gradlew :room:room-compiler-processing:test
Change-Id: Ifc18c449d1bc88696c578732a630c7ce92d773d4
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspFileMemberContainer.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationBoxTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/JavaPoetExt.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationValueTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XRoundEnvTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XRawType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XConstructorElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/PoetTestExt.kt
A room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XType.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XNullabilityTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XAnnotation.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacRawType.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingEnvTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainerTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/TypeAliasTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspJvmTypeResolver.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/KotlinMetadataTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeParameterElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/compat/XConvertersTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMemberContainer.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingStepTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/TypeInheritanceTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/InternalModifierTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspRawType.kt
na...@google.com <na...@google.com> #13
This bug was linked in a change in the following release(s):
androidx.room:room-compiler:2.5.0-beta01
androidx.room:room-compiler-processing:2.5.0-beta01
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 8b793f80b76e1009846caa8726bcb3f8150a6d4a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Sep 28 13:23:51 2022
Convert TypeWriter shared fields and methods to XPoet
By completing migration of TypeWriter to XPoet this CL enables the migration of more complex adapter that create shared DAO properties or functions including CustomTypeConverterWrapper.
Additionally convert the last remaining built-in column adapters:
* ByteBuffer
* Enum
* UUID
New XPoet APIs are:
* XPropertySpec - to represent a field in Java and a property in Kotlin
* XCodeBlock.ofJavaClassLiteral - to emit code for a java class literal (e.g. String.class or String::class.java)
* XClassName.parametrizedBy() - To create parametrized class names. Note that there is no XTypeVariableName yet.
Bug: 127483380
Bug: 247241418
Test: Existing, mainly the Java test app gives us the best coverage of Java code still being generated correctly, Kotlin generated code is partially verified.
Change-Id: I575e6f53da23a88591b2ff774fc0afa828837d97
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/EntityCursorConverterWriterTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableInsertMethodBinder.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/EntityRowAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoIndexAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpsertionAdapterWriter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InsertOrUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UuidColumnTypeAdapter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/SingleNamedColumnRowAdapter.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaPropertySpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinPropertySpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacProcessingEnv.kt
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/ByteBufferColumnTypeAdapter.kt
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 155f7ec288a5b63a136cd2e0ebd177689cc7a9e7
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Sep 26 22:36:29 2022
Convert more ColumnTypeAdapters to XPoet
* Boxed primitives
* String
* Boolean (which is really primitive boolean to int and its boxed version)
* ByteArray (blob)
Updated the signature of CustomTypeConverter but its not actually fully converted to XPoet.
Since KSP has nullability information and nullability is part of Kotlin's type system, core adapters such as String and ByteArray will not generated null-check code is type is known to be not-null. This diverges the generated code between javac and ksp and tests were updated to reflect that.
Bug: 127483380
Test: Existing tests + KotlinCodeGenTest
Change-Id: Ic3d06ac7a12fb6d2e55de60e1b75270a4541217d
A room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpsertDao.java
M room/room-compiler/src/test/kotlin/androidx/room/writer/EntityCursorConverterWriterTest.kt
A room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/PrimitiveBooleanToIntConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/kotlin/androidx/room/solver/BasicColumnTypeAdaptersTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/ByteArrayColumnTypeAdapter.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpsertDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/WriterDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/BoxedPrimitiveColumnTypeAdapter.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/CodeGenScope.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
A room/room-compiler/src/test/test-data/daoWriter/output/ksp/WriterDao.java
A room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/SingleStatementTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/ColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CompositeAdapter.kt
A room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/BoxedBooleanToBoxedIntConverter.kt
ap...@google.com <ap...@google.com> #16
Branch: androidx-main
commit 885c9eb48af78167698d95ecfde57e6b4c741ab3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Sep 29 21:49:35 2022
Generate DAOs in Kotlin
Partially migrate DAO code generation (DaoWriter, QueryWriter) to XPoet such that the simple path of InstantQueryResultBinder -> SingleItemQueryResultAdapter -> PojoRowAdapter can be completely generated in Kotlin. With this big change we are able to start parallel migration of the different supported binders and adapters.
The following codegen classes are now completely migrated to XPoet:
* QueryWriter
* InstantQueryResultBinder
* CursorQueryResultBinder
* SingleEntityQueryResultAdapter
* PojoIndexAdapter
Note that PojoRowAdapter now in-lines the FieldReadWriteWriter generated code, but it is still partially migrated to XPoet since RelationCollectorFunctionWriter is not migrated.
New XPoet APIs:
* XMemberName - To emit companion object and top-level functions / properties references.
* XFunSpec.overridingBuilder() - To create an override function builder.
* XTypeSpec.anonymousClassBuilder() - To create anonymous classes.
* XTypeSpec.companionObjectBuilder() - To create companion object classes. For Java this is just a class named 'Companion'.
Bug: 127483380
Test: Existing, mainly the Java test app. KotlinCodeGenTest now verifies generates DAO implementations (instead of isolated PojoRowAdapter). With shared functions and properties migrated we can also now tests Enums and Custom type converters, added codegen tests for those.
Change-Id: I60033b06f1c57497fc4ddbe2678f14ba589dd566
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/BaseObservableQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/CustomTypeConverterResolutionTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/PoetExt.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/EntityCursorConverterWriterTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Pojo.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithDefault.java
A room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/SingleItemQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantUpsertMethodBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
D room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/SingleEntityQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/WriterDao.java
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/ShortcutEntity.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/AutoMigrationWithProvidedSpec.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoIndexAdapter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/OptionalQueryResultAdapter.kt
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/WriterDao.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
A room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XMemberName.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithoutDefault.java
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxQueryResultBinder.kt
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpsertDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CursorQueryResultBinder.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UuidColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/LiveDataQueryResultBinder.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantInsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/TransactionWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpsertDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/InstantPreparedQueryResultBinder.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DefaultsInDaoTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/QueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/InstantQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/DataSourceFactoryQueryResultBinder.kt
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit 9d4954bde8fc18c7b728af02c02e3bf0e4482079
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Oct 04 12:23:23 2022
Support property reading and writing in Kotlin code generation.
When generating Kotlin code don't use JVM getter and setters for a Kotlin property, instead use the property syntax to get and set the 'field'. This CL only identifies when a setter / getter is a synthetic method for a property and doesn't do any extra work to recognize the backing field is for a property, it also relies on XProcessing and certain Kotlin language aspects.
* XProcessing API for inspecting fields from Kotlin properties only considers properties with backing-fields.
* XProcessing in KSP exposes synthetic getter and setter for properties as part of method inspection.
* Kotlin enforces getter to have same visibility as property, but setter can be different
* Kotlin disallows getter-like and setter-like functions that would conflict with the property's JVM generated ones.
Thus this CL changes the getter and setter codegen logic to be based on the language being emitted and the new CallType that is identified by exposing a `isKotlinPropertyMethod()` in `XMethodElement`.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I64786d7a2026ab1788ad403db62da2e2fcf5cc6a
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/kotlin/KotlinClassMetadataUtils.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspMethodElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticPropertyMethodElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeElementTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CallType.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldGetter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FieldSetter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FieldReadWriteWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/EntityNameMatchingVariationsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit 0cb41981b356abc62acab56634bda240d5809064
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 12 13:26:54 2022
Migrate QueryParameterAdapter implementations to XPoet
The migrated adapters are:
* BasicQueryParameterAdapter
* ArrayQueryParameterAdapter
* CollectionQueryParameterAdapter
A notable change is that nullability of the array and collection parameters have to be considered. Instead of prohibit this CL simply accepts them by binding a null arg when the param is null, essentially tackling
Also fixed a bug in KspArrayType.asTypeName() where the KTypeName didn't had right nullability, fixed it by using the KsTypeKotlinPoetExt (it was a missed migration).
New XPoet API:
* XCodeBlock.ofTernaryIf() - For generating inline if expressions with Java's ternary operator and Kotlin if/else.
Bug: 72246856
Bug: 127483380
Test: NullableCollectionQueryParamTest + KotlinCodeGenTest
Change-Id: I5e5b6a73733f2bbc8d111cdfa724720757ab38c5
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/NullableCollectionQueryParamTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspArrayType.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XAnnotationValueTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/ArrayQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/BasicQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/parameter/CollectionQueryParameterAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit dd774999930afba89226586051679f1e622b6649
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Oct 11 22:07:14 2022
Migrate CoroutineResultBinder to XPoet
This change deals with generating suspend overrides in Kotlin codegen which differs from Java in that the override function has the suspend modifier, does not return Any and does not have an extra Continuation param.
There is an API change too: The CancellationSignal parameter in CoroutinesRoom.execute() was incorrectly nonnull instead of nullable, nullable should have been the acceptable type since the generated code uses DBUtil.createCancellationSignal() which will return null in older APIs and is simply piped into other APIs that accept null cancellation signals such as RoomDatabase.query(), this is now fixed. This is a compatible nullability change in a restricted API is only used by Room's generated code.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I4eb7a8a038aac6b3675cb9431287942eb24a866d
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/CoroutinesRoom.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-ktx/api/restricted_current.txt
M room/room-ktx/src/main/java/androidx/room/CoroutinesRoom.kt
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit 76bf256f733dbd67b4848467d2c11489e382a594
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun Oct 16 12:31:34 2022
Migrate PreparedStatementWriter and PreparedQueryAdapter to XPoet
Migrates the simple path of prepared queries (thanks to that parameter adapters being migrated), specifically: InstantPreparedQueryResultBinder -> PreparedQueryAdapter, along with PreparedStatementWriter.
With this migration other prepared query binders can be migrated in parallel (Rx, Guava, etc...).
XPoet API Change:
* In XFunSpec.builder() renamed isOverridden to isOverride. (The typo was getting on my nerve...)
Bug: 127483380
Test: KotlinCodeGenTest + existing.
Change-Id: Ifa97d552282ca02488b1b7603b7b62fbae994d94
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/InstantPreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/PreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/result/PreparedQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit 274fb308c905bde29f7c1ab53743ecc0f60f94ba
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sun Oct 16 16:52:13 2022
Migrate DaoWriter raw query codegen to XPoet
A small but noticeable change is that we no longer assign the SupportSQLiteQuery param to a `final` local variable since for a while Room has been generating overrides with `final` parameters.
Also fixes the usage of a MemberName in EntityCursorConverterWriter, it was converted in aosp/2234531, but no Kotlin codegen test that used it was written until now.
Bug: 127483380
Test: KotlinCodeGenTest + existing.
Change-Id: Id3b5aea4a095da6fa9996abd82c4cc43bfa1aea3
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit d45c2f9ef88fdf5db441a1aa06b25406414d32cf
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Oct 19 10:36:37 2022
Migrate Kotlin delegating method binders to XPoet
When generating Kotlin there is no need to override and implement bridge functions for DefaultImpls and type args of boxed primitives. These two set of binders are only needed when generating Java and are entirely skipped in Kotlin. However, this change does migrate the binders to XPoet for migration completeness as we want to minimize JavaPoet usages in room-compiler.
Additionally add com.google.testparameterinjector:test-parameter-injector to the repo, useful for parametrized test methods (as opposed to the entire class).
Bug: 127483380
Test: KotlinCodeGenTest + DaoPrimitiveTest.kt + existing.
Change-Id: I85f675fb72b9956bc49f7153f234ff6a49efedd7
M gradle/libs.versions.toml
M gradle/verification-keyring.keys
M gradle/verification-metadata.xml
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoBoxedPrimitiveDelegateTest.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/build.gradle
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
A room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinBoxedPrimitiveMethodDelegateBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/KotlinDefaultMethodDelegateBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Dao.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinBoxedPrimitiveMethodDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/KotlinDefaultMethodDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 147eede76bdff7b75de37ef6d416c669fa93ad8f
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Oct 27 17:00:24 2022
Removing old documentation that left an import for `com.squareup.javapoet.CodeBlock` and replacing with XCodeBlock.
Bug: 127483380
Test: N/A
Change-Id: I286a629926ad811272c42c3c709034d4a7255477
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/SingleStatementTypeConverter.kt
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit 6e6b63a7001c445ac8742b39d38584aa842022c3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Oct 27 19:04:31 2022
Convert DeleteOrUpdateMethodAdapter to XPoet
Convert the simple path for @Update, @Delete and @Upsert shortcut methods to generate Kotlin, i.e. the path that uses the instant binders. @Upsert was mostly done since it shares its adapter with @Insert but the binder needed converting and since it uses update too it had to be done in at the same time.
Bug: 127483380
Test: KotlinCodeGenTest
Change-Id: I4b606c3fa71a02c6f112a836590d31c17fb4f2e1
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/DeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/InstantUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/DeleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpsertionAdapterWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpsertDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpsertDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit 28bdcef38f2e56f7fc1500d8d727db83da60d4c0
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Oct 20 16:43:15 2022
Migrate TransactionMethodBinder and TransactionMethodAdapter to XPoet
Migrate transaction binders and adapters for wrapping concrete DAO functions in a transaction, including suspending transactions.
New XPoet API:
* XTypeName.getConsumerSuperName - to create a wildcard type name for a consumer (super type of)
* XTypeName.getProducerExtendsName - to create a wildcard type name for a producer (sub type of)
Bug: 127483380
Bug: 249984508
Test: KotlinCodeGenTest
Change-Id: Ib0413d7d465f4b53af8106ff064ec772cb1fa2aa
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/javapoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/TransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/result/TransactionMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/common/input/RoomDatabaseExt.kt
D room/room-compiler/src/test/test-data/common/input/RoomDatabaseKt.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #26
Branch: androidx-main
commit c14ab25b89149316c422c2ad4c13cc0bf03b82c9
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Oct 11 19:19:59 2022
Generating Kotlin code in ListQueryResultAdapter.kt.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I3578568e4814ca12500b1f7f8227cac8d3d89fab
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/codegenpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ListQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/KotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
ap...@google.com <ap...@google.com> #27
Branch: androidx-main
commit 8aab02df135e53b45adb90c24607c47a025011d4
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Nov 03 11:12:49 2022
Migrate Relation and RelationCollectorFunctionWriter to XPoet
Migrate the relationship code writers of @Relation fields to XPoet to generate Kotlin code. This CL refactors the writer to accommodate for Kotlin's nullability checks in types along with moving some of the generated code to runtime helpers.
First the nullability of the parent and child relation columns have to be accounted when generating code that reads the 'key' column. The solution implemented is to use column readers when reading keys as these are null-aware as opposed to the hardcoded cursor get functions used. The readers are always available since the key type is based on the matching fields affinity and not the actual field type and thus they are all built-in supported types (String, Long, etc). One special type is ByteBuffer which is supported via a built-in converter for BLOB affinity. To support always finding the converter Context.fork() was updated to receive forced built-in converter states.
Second, the generated code to recursively fetch relationships when exceeding the max binding args amount was moved to runtime helpers functions in RelationUtil. This makes them easier to maintain and reduces the amount of code generation logic in the writer. However, the fetch functions are a bit redundant with each other as they need to support various map types, specifically HashMap, LongSparseArray and ArrayMap. This also means room-runtime has a new compileOnly dependency on androidx.collection to support having these runtime helper functions. The function to be use is still determine by room-compiler and the availability of androidx.collection types in the project's classpath.
XProcessing change:
* Fixed requireType(XTypeName) in KSP to not simply use KTypeName as String since that might contain the `?` suffix when nullable and will fail lookup. Instead find the type using the canonical name and then make nullable or non null based on XTypeName.nullability.
New XPoet API:
* XCodeBlock.indent() and XCodeBlock.unindent() - For adding and removing code indent, useful for lambdas.
* XTypeName.rawTypeName - For getting the raw type name of a parametrized type name. Even though there is no XParametrizedTypeName,the function is available to all type names returning itself if not parametrized.
Bug: 127483380
Test: DaoRelationshipKotlinCodeGenTest + existing
Change-Id: I2baf26703b1cc57e14af23e7ac452028a389d9ed
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinCodeBlock.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnv.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/ByteBufferColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Relation.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/BuiltInConverterFlagsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/BaseDaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/DaoRelationshipKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/common/input/collection/ArrayMap.java
A room/room-compiler/src/test/test-data/common/input/collection/LongSparseArray.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/build.gradle
A room/room-runtime/src/main/java/androidx/room/util/RelationUtil.kt
ap...@google.com <ap...@google.com> #28
Branch: androidx-main
commit 35a9063a3822179d22a3fdfdc7d041269d3c359d
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Nov 07 16:04:03 2022
Migrate SQLiteOpenHelperWriter and ValidationWriter impls to XPoet.
This migrations allow Room to generate the RoomOpenHelper.Delegate in Kotlin and moves it back to be an inner class of the database impl, instead of a separate class.
This CL in part reverts aosp/2290293.
Also, renamed the param name of most RoomOpenHelper.Delegate functions from 'database' to 'db', aligning with the other functions, even though this is regarded as an incompatible change, these functions are only called from generated code that up until now was Java code, thus it is a safe change.
Bug: 127483380
Test: DatabaseKotlinCodeGenTest + existing
Relnote: Revert the API changes in aosp/2290293, but also renamed the db param name of most RoomOpenHelper.Delegate.
Change-Id: I1b11d32c24d1489b8f03a8fc723252e8501f2fa7
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/ViewInfoValidationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/SQLiteOpenHelperWriterTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
D room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase_Impl_OpenHelperDelegate.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
D room/room-runtime/api/current.ignore
M room/room-runtime/api/current.txt
M room/room-runtime/api/public_plus_experimental_current.txt
M room/room-runtime/api/restricted_current.ignore
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
M room/room-runtime/src/main/java/androidx/room/RoomOpenHelper.kt
M room/room-testing/src/main/java/androidx/room/testing/MigrationTestHelper.kt
ap...@google.com <ap...@google.com> #29
Branch: androidx-main
commit 7e7bb0bd279d754b7cdd96e93d8f930989160bb6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Nov 07 10:54:49 2022
Migrate DatabaseWriter to XPoet
This migrations allow Room to generate the database implementation in Kotlin.
Some notable changes:
* getAutoMigrations() was changed to not use Arrays.asList() and instead just add to an ArrayList. Keeps the XPoet part equivalent for both languages.
* For Java Dao impl getters emit memoization logic, but for Kotlin we'll just use Lazy, making the getter way simpler.
* This changes adds overriding abstract dao property, but it has a few flaws. Follow-up bug filled.
New XPoet API:
* Created the fallback API for XPropertySpec to allow access to the actual builder when the code generation diverges too much between languages. Used to add 'volatile' modifier in Java and for property overriding.
Bug: 127483380
Test: DatabaseKotlinCodeGenTest + existing
Change-Id: I723023639b276368e87c6abe3dc3b807bc419b42
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/AmbiguousColumnIndexAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/EntityRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/AutoMigration.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/FtsTableInfoValidationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
A room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-runtime/src/main/java/androidx/room/Room.kt
ap...@google.com <ap...@google.com> #30
Branch: androidx-main
commit 4183f5c0af2b47c63e050b4c684bfe95c7b43fa6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Sat Nov 05 11:36:03 2022
Temporarily generate RoomOpenHelper.Delegate in its own Java file.
Generating the RoomOpenHelper.Delegate in its own file helps us migrate DatabaseWriter to XPoet so it can generate Kotlin code without having to also migrate SQLiteOpenHelperWriter.
Since the delegate is no longer an inner class two API had to be opened up in RoomDatabase to be called from the delegate. These are temporary and will be removed once the delegate is moved back to an inner class.
Bug: 127483380
Test: Existing
Relnote: Add restricted temporary API in RoomDatabase to be accessed by generated OpenHelper Delegate.
Change-Id: I2f206155ba48a235c580596dcad8bd3179a3ca24
M room/room-compiler/src/main/kotlin/androidx/room/DatabaseProcessingStep.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/SQLiteOpenHelperWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/SQLiteOpenHelperWriterTest.kt
M room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase.java
A room/room-compiler/src/test/test-data/databasewriter/output/ComplexDatabase_Impl_OpenHelperDelegate.java
A room/room-runtime/api/current.ignore
M room/room-runtime/api/current.txt
M room/room-runtime/api/public_plus_experimental_current.txt
M room/room-runtime/api/restricted_current.ignore
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/main/java/androidx/room/RoomDatabase.kt
ap...@google.com <ap...@google.com> #31
Branch: androidx-main
commit e695d18e07c066ffd30d901023a19c425615eadd
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 08 21:12:14 2022
Migrate the remaining converters from the NullAwareTypeAdapterStore to XPoet
Also add more tests for custom type converters, including provides ones. This lead me to find that the getter for the provided converter was not quite right and ended up refactoring similar to dao impl getters, where we use a kotlin.Lazy when generating Kotlin otherwise the getter has memoization logic. Due to the lazy, Dao impl constructors had to be moved to the primary constructor, hence all Kotlin codegen tests update.
New XPoet API:
* XTypeSpec.Builder.setPrimaryConstructor() - For setting the primary constructor of a type, note that this has no real effect when generating Java, but will do when generating Kotlin.
Bug: 127483380
Test: DaoKotlinCodeGenTest + existing
Change-Id: Id07edb2af23f02a920cdcd6a132d5a04b6f0c4db
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CompositeTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NoOpConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NullAwareTypeConverters.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/TypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UpCastTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/abstractClassWithParam.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_composite.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_nullAware.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_provided.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_upcast.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #32
Branch: androidx-main
commit 917948e6651180b64a251926b9aba9b02f65cd50
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Tue Nov 15 20:09:58 2022
Cleanup usage of XType.typeName and XTypeElement.className
This CL handles most of room-compiler usages, but there are still more left in room-compiler-processing and various other non-converter type adapters.
New API in XProcessing:
* XType.isTypeVariable - To check if the type represents an unresolved type variable.
New XPoet API:
* XTypeName.isBoxedPrimitive - To check if the type is a boxed primitive.
* XTypeName.equalsIgnoreNullability - For comparing type names while ignoring nullability.
* XTypeName.toString - A version of toString() that takes the code language to print JPoet or KPoet names.
* Added boxed primitives
Bug: 127483380
Bug: 247247366
Bug: 247248619
Bug: 248280754
Bug: 249173483
Test: Existing
Change-Id: Idbadc464a5222644cc2ec0452a3855d5232b570f
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/PoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeName.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/DeclarationCollector.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XExecutableElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XFieldElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XProcessingEnv.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XTypeParameterElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/javac/JavacTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspFileMemberContainer.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeArgumentType.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspTypeElement.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainer.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/codegen/XTypeNameTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XProcessingEnvTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XTypeTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/KspTypeNamesGoldenTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/ksp/synthetic/KspSyntheticFileMemberContainerTest.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/util/TestExtensions.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xtype_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/parser/SqlParser.kt
M room/room-compiler/src/main/kotlin/androidx/room/preconditions/Checks.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/AutoMigrationProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/Context.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/CustomConverterProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/FtsTableEntityProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/InsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/PojoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ShortcutMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TableEntityProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpdateMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/UpsertionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/NullAwareTypeConverterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CursorQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/result/PreparedQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultimapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/result/InsertOrUpsertMethodAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/CoroutineTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/transaction/binder/InstantTransactionMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/BoxedBooleanToBoxedIntConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/NullAwareTypeConverters.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/StringColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/UpCastTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RelationCollector.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityCursorConverterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityDeletionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityInsertionAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/EntityUpdateAdapterWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/PreparedStatementWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/RelationCollectorFunctionWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/ext/ElementExtTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/parser/SQLTypeAffinityTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/AutoMigrationProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/EntityNameMatchingVariationsTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts3TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/Fts4TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/autovalue/AutoValuePojoProcessorDelegateTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/Signatures.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeConverterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
ap...@google.com <ap...@google.com> #33
Branch: androidx-main
commit 7acd1f3d757bbbf51f4aae31141465f9426cebbf
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 15 15:20:40 2022
Generating Kotlin in ArrayQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I855161d2695deecdce90ab8d170db35500905eb7
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ArrayQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_array.kt
ap...@google.com <ap...@google.com> #34
Branch: androidx-main
commit 77b07ae76aeec7ee7b59cd0297e7bc2777efa4ff
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 15 15:14:01 2022
Refactoring TypeWriter.
Old version was generating the incorrect suppression tags for Kotlin (same as Java)
Bug: 127483380
Test: ./gradlew :room:room-compiler:test
Change-Id: I5aeac62b7f062832dd4925a31b84370f55e99679
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/abstractClassWithParam.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/arrayParameterAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/basicParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/collectionParameterAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutineResultBinder.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_boxedPrimitiveBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/delegatingFunctions_defaultImplBridge.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/deleteOrUpdateMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/entityRowAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/insertOrUpsertMethodAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_boolean.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_byteArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_composite.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_nullAware.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_provided.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_upcast.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_embedded.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_internalVisibility.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_primitives_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_string.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_uuid.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_variableProperty_java.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedQueryAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_list.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_map.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_map_ambiguousIndexAdapter.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/rawQuery.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_arrayMap.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_byteBufferKey.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_longSparseArray.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/relations_nullable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_interface.kt
ap...@google.com <ap...@google.com> #35
Branch: androidx-main
commit 581ce0b5ddb3830d6a515b3ea81feaf04070ff69
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 12:55:08 2022
Generating Kotlin in GuavaOptionalQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I2932ab180f62d411b83f6890c87b51fbe6f38004
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaOptional.kt
ap...@google.com <ap...@google.com> #36
Branch: androidx-main
commit 428c531bbcda8f5bee17da99348d78a29c54cd0b
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 08 15:59:11 2022
Generating Kotlin in OptionalQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I77186932f0a8b3d6da800356cf0daa3ea42136cc
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/OptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_optional.kt
ap...@google.com <ap...@google.com> #37
Branch: androidx-main
commit 268572539eda5a3eddc49fb63e5dc9ac87179e37
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 08 13:56:40 2022
Generating Kotlin in ImmutableListQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I3c072df6f6cc6ddf83a6c527892bff1227d46e7e
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableListQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_immutable_list.kt
ap...@google.com <ap...@google.com> #38
Branch: androidx-main
commit 906a064761e91002d1a5be0d9f92fdbfde519823
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 16:53:15 2022
Generating Kotlin in GuavaImmutableMultimapQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I932739d8323c0dac51f4e28f8e9fe8251206e677
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaImmutableMultimapQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaOptionalQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaImmutableMultimap.kt
ap...@google.com <ap...@google.com> #39
Branch: androidx-main
commit 4c09727d0759740ce5632fce389558a2558d49f1
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Nov 22 16:15:47 2022
Generating Kotlin in GuavaImmutableMapQueryResultAdapter.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I2a6fa079dea28c68805a1d6e4a62b8555b217516
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableListQueryResultAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/ImmutableMapQueryResultAdapter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/queryResultAdapter_guavaImmutableMap.kt
ap...@google.com <ap...@google.com> #40
Branch: androidx-main
commit 4defed070d5031434f7a04bed92b76d5cd37a350
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Dec 01 15:14:20 2022
Converting paging sources in the compiler tests to Kotlin.
Bug: 127483380
Test: N/A
Change-Id: Ic15d9c19e8eab66ec616983037ebd0ea095dce0e
M room/room-compiler/src/test/test-data/common/input/LimitOffsetListenableFuturePagingSource.kt
A room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx3PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/ListenableFuturePagingSource.kt
M room/room-compiler/src/test/test-data/common/input/PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx3PagingSource.kt
ap...@google.com <ap...@google.com> #41
Branch: androidx-main
commit 190bd087cd58bcb7eb3b208f55b4afa09e31aec0
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Nov 23 12:15:09 2022
Generating Kotlin in MultiTypedPagingSourceQueryResultBinder.
Bug: 127483380
Test: TypeAdapterStoreTest.kt, DaoKotlinCodeGenTest.kt
Change-Id: Id592fe870ef1a3896f144e13c73e081d1d45e54e
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/ListenableFuturePagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava2PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava3PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetListenableFuturePagingSource.kt
D room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.java
M room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/LimitOffsetRx3PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/ListenableFuturePagingSource.kt
M room/room-compiler/src/test/test-data/common/input/PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx2PagingSource.kt
M room/room-compiler/src/test/test-data/common/input/Rx3PagingSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/multiTypedPagingSourceResultBinder.kt
ap...@google.com <ap...@google.com> #42
Branch: androidx-main
commit bd1249f0b3581425c22e58d8592bab96e1440d7e
Author: elifbilgin <elifbilgin@google.com>
Date: Wed Dec 14 13:44:53 2022
Generating Kotlin in DataSourceFactoryQueryResultBinder and PositionalDataSourceQueryResultBinder.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: I471f9c2814f3d70b91fc244346fd989c6d69ecbe
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/DataSourceFactoryQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/DataSourceFactoryQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/PositionalDataSourceQueryResultBinder.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/common/input/DataSource.kt
D room/room-compiler/src/test/test-data/common/input/PositionalDataSource.java
A room/room-compiler/src/test/test-data/common/input/PositionalDataSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/dataSource.kt
ap...@google.com <ap...@google.com> #43
Branch: androidx-main
commit 1f7665431be7c1caaeb8d7740723ec1befde3afb
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Nov 21 17:21:44 2022
Generating Kotlin in the remaining files.
This CL mainly focused on RxCallableQueryResultBinder, BaseObservableQueryResultBinder and TransactionWrapper to generate Kotlin. However, many other cases have also been handled, including shortcut methods, prepared queries, all rxjava2, rxjava3 and ListenableFuture return values.
Bug: 127483380
Test: KotlinCodeGenTest.kt
Change-Id: Iff93bb2ee7b3cb0f5a20774470bc7909349f0ce4
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/MethodProcessorDelegate.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/RxTypes.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/CoroutineFlowResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/GuavaListenableFutureQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/ListenableFuturePagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/LiveDataQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/QueryResultBinderProviderWithRequiredArtifact.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxCallableQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava2PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxJava3PagingSourceQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/RxQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/GuavaListenableFuturePreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/BaseObservableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineFlowResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/CoroutineResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/GuavaListenableFutureQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/LiveDataQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/TransactionWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableDeleteOrUpdateMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableInsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binder/CallableUpsertMethodBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureUpsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableUpsertMethodBinderProvider.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TransactionMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/test-data/common/input/CoroutinesRoom.kt
M room/room-compiler/src/test/test-data/common/input/GuavaRoom.java
M room/room-compiler/src/test/test-data/common/input/Rx2Room.java
M room/room-compiler/src/test/test-data/common/input/Rx3Room.java
D room/room-compiler/src/test/test-data/common/input/coroutines/Channel.java
M room/room-compiler/src/test/test-data/common/input/coroutines/Channel.kt
M room/room-compiler/src/test/test-data/common/input/coroutines/ReceiveChannel.kt
M room/room-compiler/src/test/test-data/common/input/rxjava2/Completable.java
A room/room-compiler/src/test/test-data/common/input/rxjava2/EmptyResultSetException.java
M room/room-compiler/src/test/test-data/common/input/rxjava2/Maybe.java
M room/room-compiler/src/test/test-data/common/input/rxjava2/Single.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Completable.java
A room/room-compiler/src/test/test-data/common/input/rxjava3/EmptyResultSetException.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Flowable.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Maybe.java
M room/room-compiler/src/test/test-data/common/input/rxjava3/Single.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
A room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/guavaCallable.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/liveDataCallable.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/paging_dataSource.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx2CallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx2PreparedCallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx3CallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/rx3PreparedCallableQuery.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rxJava.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_suspend.kt
M room/room-rxjava3/src/main/java/androidx/room/rxjava3/EmptyResultSetException.java
ap...@google.com <ap...@google.com> #44
Branch: androidx-main
commit 2c9e6af2d1d7fbaec41ebe0605c0b1ca441d848c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 12:46:57 2022
Fix some issues attempting to generate Kotlin in Room integration test.
* Use method `name` instead of `jvmName` when target language is Kotlin
* Rx shortcut queries of Completable must use nullable Void as typearg for Callable.
* EnumColumnTypeAdapter should use type element XClassName when generating switch and when cases, avoids emitting '?' when the `out` is nullable due to null-aware conversion.
* Use begin and end control flow functions when generating the `lazy` DAO property in the database impl.
Bug: 127483380
Test: Existing
Change-Id: I9569a7505eb5e5599b80b32ff7aeb6edd8e112b6
M room/integration-tests/kotlintestapp/src/androidTest/java/InvalidationTrackerExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/RawQueryMethodProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/RxCallableUpsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/CustomTypeConverterWrapper.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/types/EnumColumnTypeAdapter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Constructor.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/CustomTypeConverter.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/RawQueryMethod.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/Signatures.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/callableQuery_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/callableQuery_rx3.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_simple.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedCallableQuery_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/preparedCallableQuery_rx3.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rx2.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_rx3.kt
ap...@google.com <ap...@google.com> #45
Branch: androidx-main
commit 63239ab080e845cec39acc65fbd102fe9510413a
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 16:36:29 2022
Use internal visibility modifier in Room generated overrides for Kotlin codegen.
For Java internal visibility overrides are converted to public, there is no compiler check for exposing internal types. Also, AutoMigrations in Kotlin will be `internal` by default as opposed to public.
Bug: 127483380
Bug: 262615155
Test: Existing + DatabaseKotlinCodeGenTest.database_internalVisibility
Change-Id: I63aa5a5dfe21dd1f30fc999815038cc457429d49
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/VisibilityModifier.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DaoWriter.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/database_internalVisibility.kt
A room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_customTypeConverter_internalVisibility.kt
ap...@google.com <ap...@google.com> #46
Branch: androidx-main
commit aa2b688d0597b37ec9e73904eb68d94f83b83fd3
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Dec 21 17:19:46 2022
Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen.
Queries that are declared as a property and Room overrides the getter function give a false notion that the property is immutable or has a fixed stored result, that it won't change, however the getter is not pure, it can return different results if called at different times based on the data in the database. Therefore, this change disallows them when generating Kotlin.
Even though a DAO property in the abstract Database is a more appropriate case since Room generated code does cache the created DAO instance, it is encoding implementation logic. Kotlin codegen is greatly simplified when disallowed.
Bug: 127483380
Bug: 257967987
Test: DatabaseProcessorTest and DaoProcessorTest
Relnote: Disallow abstract properties as DAO getters or DAO queries in Kotlin codegen, instead they should be rewritten as functions to avoid the false notion that the property value is immutable and has a fixed stored result.
Change-Id: If6a13382b351fbcf9072a40c496d600cd329fd38
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/AmbiguousColumnResolverTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InternalsTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/InvalidationTrackerFlowTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ItemWithNullableConstructor.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/JvmNameInDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ListenableFuturePagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/MultiTypedPagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/NullableCollectionQueryParamTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/Rx2PagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/Rx3PagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SyncTriggersConcurrencyTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/testutil/PagingDb.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DaoProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/DatabaseWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DatabaseProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DatabaseKotlinCodeGenTest.kt
D room/room-compiler/src/test/test-data/kotlinCodeGen/database_propertyDao.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/database_withFtsAndView.kt
ap...@google.com <ap...@google.com> #47
Branch: androidx-main
commit 960274cef62fbb0674de42eb4ea5444940a4b15f
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Dec 22 13:54:59 2022
Disallow non-null Void for ListenableFuture, and type args in general.
Since the Void class cannot be instantiated and 'null' is always returned, it is an error to declare a type arg as non-null Void and instead should be declared as nullable, e.g. ListenableFuture<Void?>.
Also, while inspecting usages of COMMON_TYPES.VOID I notice we had a missing `makeNullable` for Rx prepared queries with Completable. This change fixes that and makes the CallablePreparedQueryResultBinder gen code simpler.
Bug: 127483380
Test: Various @Test nonNullVoidGuava()
Change-Id: Ie91d084974d73ebfe81d6ca548b30e41b8626b23
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/GuavaListenableFutureQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binder/CallablePreparedQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/GuavaListenableFuturePreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/prepared/binderprovider/RxPreparedQueryResultBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/RxCallableQueryResultBinder.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureDeleteOrUpdateMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureInsertMethodBinderProvider.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/shortcut/binderprovider/GuavaListenableFutureUpsertMethodBinderProvider.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DeleteOrUpdateShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/RawQueryMethodProcessorTest.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/UpdateDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/DeletionDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/UpdateDao.java
ap...@google.com <ap...@google.com> #48
Branch: androidx-main
commit a92310aafb4b4179b34ecb3bb4eacd7ece310266
Author: elifbilgin <elifbilgin@google.com>
Date: Tue Dec 20 07:34:17 2022
Removing usages of $S, $T, $N, $L, $W and `toJavaPoet()` across all files in Room.
Bug: 127483380
Test: Existing tests
Change-Id: I27bfd88931f04370eb54a6f6bb49c384edefe18d
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XPropertySpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/XTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/java/JavaTypeSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinFunSpec.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/codegen/kotlin/KotlinTypeSpec.kt
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/TypeWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/CustomConverterProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/DaoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/InsertOrUpsertShortcutMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/PojoProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/processor/TableEntityProcessorTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/CustomTypeConverterResolutionTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/TypeAdapterStoreTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DefaultsInDaoTest.kt
M room/room-runtime/src/main/java/androidx/room/EntityUpsertionAdapter.kt
ap...@google.com <ap...@google.com> #49
Branch: androidx-main
commit c1172018f847f8e5dc003c311fb1db39478c0b5e
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jan 23 20:08:36 2023
Fix suspend vararg Kotlin overrides in XPoet
Also apply spread operator when calling super / delegate function in concrete @Transaction DAO functions, this is needed because unlike Java, Kotlin does not treat equally vararg parameters with its array representation.
Bug: 127483380
Bug: 253268357
Test: DaoKotlinCodeGenTest
Change-Id: I6de00f405a7693101ccbe5468c551d6a688c19c9
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/JavaPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/KotlinPoetExt.kt
M room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/ksp/KspExecutableElement.kt
M room/room-compiler-processing/src/test/java/androidx/room/compiler/processing/XExecutableElementTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/processor/TransactionMethodProcessor.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/DaoKotlinCodeGenTest.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/coroutines.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/shortcutMethods_suspend.kt
M room/room-compiler/src/test/test-data/kotlinCodeGen/transactionMethodAdapter_abstractClass.kt
ap...@google.com <ap...@google.com> #50
Branch: androidx-main
commit 856cad743cb01aef3ebbda03aebc6ee0a3ec0d13
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jan 23 20:13:18 2023
Fix various miss usages of non-null return type queries that are asserted to return null.
Bug: 127483380
Test: Existing
Change-Id: I59388b991a71dd895459dd23c9d237e067f90766
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BooksDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DeferredBooksDaoTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DependencyDaoTest.kt
M room/integration-tests/kotlintestapp/src/main/java/androidx/room/integration/kotlintestapp/dao/DependencyDao.kt
ap...@google.com <ap...@google.com> #51
Branch: androidx-main
commit d62dc3503f7b3ce001aea49bd212724cb15a6e4b
Author: elifbilgin <elifbilgin@google.com>
Date: Fri Feb 03 11:22:25 2023
Removing automigration related warnings as well as nullable collection parameter warnings in preparation for turning on the Kotlin CodeGen testapp.
Test: AutoMigrationWriterTest.kt, BoxedNonNullTypesTest.kt
Bug: 127483380
Change-Id: I6833210feb3dbfa05cac7d3b96eaf467d3365fa7
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/BoxedNonNullTypesTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/AutoMigrationWithProvidedSpec.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithDefault.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/java/ValidAutoMigrationWithoutDefault.java
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/AutoMigrationWithProvidedSpec.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithDefault.kt
M room/room-compiler/src/test/test-data/autoMigrationWriter/output/kotlin/ValidAutoMigrationWithoutDefault.kt
ap...@google.com <ap...@google.com> #52
Branch: androidx-main
commit f748a172bc0cdddab04240280a1a8305b5e3b848
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Mar 02 10:27:43 2023
Duplicating all AutoMigration related tests in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: AutoMigrationTest.kt, ProvidedAutoMigrationSpecTest.kt
Change-Id: Ifbee2f1e01ea4d81579e5c1a17dab9f14c339a39
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/3.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas-ksp/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.AutoMigrationDb/3.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.EmbeddedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/1.json
A room/integration-tests/kotlintestapp/schemas/androidx.room.integration.kotlintestapp.migration.ProvidedAutoMigrationSpecTest.ProvidedAutoMigrationDb/2.json
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/AutoMigrationDb.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/AutoMigrationTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/EmbeddedAutoMigrationDb.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/migration/ProvidedAutoMigrationSpecTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Album.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumNameAndBandName.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumWithSongs.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Artist.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Playlist.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistSongXRef.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistWithSongs.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ReleasedAlbum.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Song.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-testing/build.gradle
A room/room-testing/schemas/androidx.room.testing.kotlintestapp.migration.SimpleAutoMigrationDb/1.json
A room/room-testing/schemas/androidx.room.testing.kotlintestapp.migration.SimpleAutoMigrationDb/2.json
A room/room-testing/src/androidTest/java/androidx/room/testing/kotlintestapp/migration/AutoMigrationAndMigrationTest.kt
A room/room-testing/src/androidTest/java/androidx/room/testing/kotlintestapp/migration/SimpleAutoMigrationDb.kt
ap...@google.com <ap...@google.com> #53
Branch: androidx-main
commit 9802ded90ece9749211346118239bce19a8573d7
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Mar 13 16:08:00 2023
Duplicating tests into the kotlin test app that test conflict in DAOs.
Bug: 127483380
Test: DaoConflictStrategyTest.kt, DaoNameConflictTest.kt
Change-Id: Ia2feeda6f862805672caa6866c6fc819dd0dc0d8
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/TestDatabase.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/PetDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/ToyDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoConflictStrategyTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/DaoNameConflictTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Day.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Pet.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetAndOwner.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetUser.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetWithToyIds.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PetWithUser.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Toy.kt
ap...@google.com <ap...@google.com> #54
Branch: androidx-main
commit bfc8f1bd124699a3061c61238e5c8f22bb4d194f
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Mar 06 19:42:35 2023
Duplicating all Multimap related tests in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: MultimapQueryTest.kt
Change-Id: Iee3534d141fa52b2fb331e12930fc221cc171fd9
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/TestDatabase.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/MusicDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/MultimapQueryTest.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestObserver.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/AlbumNameAndBandName.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Image.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ImageFormat.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistMultiSongXRefView.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/PlaylistWithSongTitles.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/ReleasedAlbum.kt
ap...@google.com <ap...@google.com> #55
Branch: androidx-main
commit bfa6a0036c4db067a6df9e033c1dcb478a84969f
Author: elifbilgin <elifbilgin@google.com>
Date: Fri Mar 17 13:54:11 2023
Duplicating ProvidedTypeConverterTest in the Kotlin test app, in Kotlin.
Bug: 127483380
Test: ProvidedTypeConverterTest.kt
Change-Id: Ia5e305a0cd60a058d55c0255283e40f994efc3c0
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/RobotsDao.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ProvidedTypeConverterTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/TestUtil.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Cluster.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Hivemind.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Pet.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/Robot.kt
A room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/vo/RobotAndHivemind.kt
Description