Status Update
Comments
fs...@google.com <fs...@google.com> #2
Thinking through options.
Here's my assumptions:
- We need to find one way or another to upgrade AGP because waiting a few release cycles for the libraries with lint checks is not really viable.
- We can't enable the bytecode verifier without breaking loading the AIDL lexer
- We can't update the published lint checks to use the new analysis API immediately because the checks will start breaking in previous AGP versions.
- We can update our internal non-published lint checks to the new API.
Could we potentially update all our internal lint checks, manually disable the problematic published checks in AndroidX plugin, and temporarily duplicate them to internal checks with the new API so we can continue running those checks until we are able to update them?
al...@google.com <al...@google.com> #3
We can't enable the bytecode verifier without breaking loading the AIDL lexer
Our AIDL lexer? If so, I'm open to the argument that implementing the Stable AIDL linter and hacking together the lexer was a bad idea and I never should have done it.
manually disable the problematic published checks in AndroidX plugin
The Stable AIDL linter isn't published, fortunately. What are the other problematic checks?
al...@google.com <al...@google.com> #4
We can't update the published lint checks to use the new analysis API immediately because the checks will start breaking in previous AGP versions.
AGP / Lint team needs to tell us how to handle this cleanly.
fs...@google.com <fs...@google.com> #5
Our AIDL lexer? If so, I'm open to the argument that implementing the Stable AIDL linter and hacking together the lexer was a bad idea and I never should have done it.
Yep ours. Or more specifically I'm assuming we can't re-enable the bytecode validator. If we can that's the easiest thing to do. I was under the impression we needed it disabled was for AIDL lexer.
What are the other problematic checks?
The checks that will break when we update if we don't either update them or enable the bytecode verifier are:
LambdaStructuralEquality
UnnecessaryLambdaCreation
AutoboxingStateCreation
MutableCollectionMutableState
ModifierFactoryExtensionFunction
ModifierFactoryReturnType
ModifierFactoryUnreferencedReceiver
ReturnFromAwaitPointerEventScope
SuspiciousModifierThen
NullSafeMutableLiveData
al...@google.com <al...@google.com> #6
I was under the impression we needed it disabled was for AIDL lexer.
Yeah, that's accurate. It references all sorts of stuff that it probably shouldn't be referencing.
I'm okay with disabling the Stable AIDL lint check if it's a blocker.
al...@google.com <al...@google.com> #7
I went to look for the Stable AIDL lint check and found that we
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit fc9310feeb4d53e383877e2e06ce1178122e0ba7
Author: Fred Sladkey <fsladkey@google.com>
Date: Sun Sep 15 10:03:31 2024
Enable lint bytecode verifier and update baselines
Bug: 364864906
Test: ./gradlew lintRelease
Change-Id: Ifad2cb105b4cead4b3b970ce6f457209461633fa
D appsearch/appsearch/lint-baseline.xml
M car/app/app/lint-baseline.xml
M compose/animation/animation-core/lint-baseline.xml
M compose/foundation/foundation/integration-tests/foundation-demos/lint-baseline.xml
M compose/foundation/foundation/lint-baseline.xml
D compose/ui/ui-geometry/lint-baseline.xml
M core/core/lint-baseline.xml
M gradlew
D lifecycle/lifecycle-viewmodel-savedstate/lint-baseline.xml
D room/room-guava/lint-baseline.xml
M room/room-runtime/lint-baseline.xml
D room/room-rxjava2/lint-baseline.xml
D tv/tv-foundation/lint-baseline.xml
M wear/compose/compose-foundation/lint-baseline.xml
Description