Status Update
Comments
ma...@google.com <ma...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
ml...@google.com <ml...@google.com> #3
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ma...@google.com <ma...@google.com> #5
There is no easy way to do this. This is because you may have your own tasks triggering generateBaselineProfile
, or you want simply to run the tests to generate the profile without actually updating the consumer. Or because you do expect that calling assemble
will update the profiles.
I would simply rely on documentation here.
The right syntax to disable those tasks (so that profiles won't be generated when calling assemble) in that project is:
./gradlew assemble -x :baselineProfile:pixel6Api31Setup -x :baselineProfile:pixel6Api31NonMinifiedReleaseAndroidTest
We could add a property if it makes it easier, since it's an issue specific to ubuntu github runners, something along the lines of:
-Pandroidx.baselineprofiles.skipgeneration
That basically does the same of the -x
options I mentioned above.
ml...@google.com <ml...@google.com> #6
While I'm ok with adding the parameters, it feels like a hard-to-understand problem for a newcomer that just applies the plugin and suddenly their build
or assemble
tasks start failing (or start taking way longer).
ma...@google.com <ma...@google.com> #7
I agree but there isn't much we can do. This is also not related to AGP but to how gradle works: assemble
is a task that also "prepares" the configurations (that in gradle are used to carry artifacts). When triggering the configuration we use to expose the baseline profile artifacts the GMD device setup also starts, since it's part of the task chain to produce the artifact.
The only option we've is to decide when to disable those specific tasks, so that the configuration won't have any artifact and don't generate/update the baseline profile.
The property I've implemented is one way. The other way I've explored is to check what task the user invoked but this can potentially break other flows. For example, consider if the user launched:
./gradlew :baselineprofile:assemble :app:generateBaselineProfile :app:assemble
The result is that the baseline profile wouldn't be generated (or updated), the app would be assembled and there would be no failure. Other examples could be cases in which the user defined its own task and adds a dependency on the generation task.
Disabling some tasks based on what the user launched might ultimately be worse in other settings. I think a good trade-off is documentation and the above mentioned property but I'm open to ideas.
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 79938912e132e8fb24ece4e24d067637e8ea5fe0
Author: Marcello Albano <maralb@google.com>
Date: Wed May 24 11:42:52 2023
Added option to skip baseline profile generation
This PR introduces a new property
`androidx.baselineprofile.skipgeneration` used by the baseline profile
producer plugin. When the property is on it will disable test tasks and
provide empty artifact for baseline profiles. This is helpful for
Github CI projects that don't support KVM.
Enabling this property has the same effect of:
./gradlew assemble \
-x :baselineProfile:pixel6Api31NonMinifiedReleaseAndroidTest \
-x :baselineProfile:collectNonMinifiedReleaseBaselineProfile
Test: ./gradlew :benchmark:benchmark-baseline-profile-gradle-plugin:test
Bug:
Change-Id: I37fda3f4b5761d8229c83be7d7a2cda197e8dbc8
Relnote: Added property to skip baseline profile generation. Usage: `./gradlew assemble -Pandroidx.baselineprofile.skipgeneration`.
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/consumer/task/MergeBaselineProfileTask.kt
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/BaselineProfileProducerPlugin.kt
A benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/BaselineProfileProducerProperties.kt
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/tasks/CollectBaselineProfileTask.kt
M benchmark/baseline-profile-gradle-plugin/src/main/kotlin/androidx/baselineprofile/gradle/producer/tasks/InstrumentationTestTaskWrapper.kt
M benchmark/baseline-profile-gradle-plugin/src/test/kotlin/androidx/baselineprofile/gradle/consumer/BaselineProfileConsumerPluginTest.kt
M benchmark/baseline-profile-gradle-plugin/src/test/kotlin/androidx/baselineprofile/gradle/producer/BaselineProfileProducerPluginTest.kt
ma...@google.com <ma...@google.com>
pr...@google.com <pr...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.benchmark:benchmark-baseline-profile-gradle-plugin:1.2.0-alpha15
Description
Component Used: BPGP 1.2.0-alpha14
Our performance samples CI pipeline was running
./gradlew build
, which triggerspixel6Api31Setup
GMD task for the:baselineProfile
plugin that applies BPGP.I tried using
build -x test
or evenassemble -x test
but this task is always triggerd and fails (probably due to usingubuntu-latest
).Can we run this task only when
generateBaselineProfile
task is running?