Status Update
Comments
da...@google.com <da...@google.com> #2
Note there is a second mysterious aspect of the failure regarding infra, the
cc...@google.com <cc...@google.com> #3
It's also super weird that Dany found that disabling AOT for the benchmark also worked around the problem - potentially a bug to create a repro for (with a specific API) and pass along to ART.
ma...@google.com <ma...@google.com> #4
For context, yesterday I was looking at this and it doesn't seem to be related to force compile flag (that underlying is only launching cmd package compile ...
).
The built instrumentation apk was missing the generated classes, when they were created in an inner class, so the fix was moving those classes to top level.
So the issue can only be one of the following:
- the src set not correctly configured for libraries with build type release (but this is not something the plugin is doing)
- the generated classes somehow missing when not top level?
But the issue is not related per se to the Benchmark plugin.
ma...@google.com <ma...@google.com> #5
can you try to manually set testBuildType = release
in your android
block and see if you can reproduce? I suspect it might either be an agp bug or a room issue.
Description
See b/398063938 for context
Essentially it was found that when the benchmark plugin (tip of tree version) is applied to the room-benchmark project it would cause KSP generated files to not be included in the APK which leads to Room failing to find generated implementation. At the time KSP2 and Kotlin 2.1.10 was being used.
The KSP files were confirmed to be generated, so it doesn't seem to be a misconfiguration of the processor, but somehow the generated sources where not being picked up for the android test.
A mysterious fix was done inhttps://android-review.googlesource.com/3506153 that moves the database files from nested classes top top-level classes and that fixed the issue, but it was not discovered as to why such change fixes the problem.
I'm filling this bug in at attempt to follow-up and further investigate the root cause.