Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Move lint-common TestFile util to individual test sources
Expand for full commit details
Move lint-common TestFile util to individual test sources
Create CompatKotlinAndBytecodeStub in lint-common to store parameters such as filename and sourcecode - data that is required to generate TestFiles for lint tests.
Individual test sources in runtime-lint, compose-lint etc will convert CompatKotlinAndBytecodeStub into KotlinAndBytecodeStub for the correct test inputs (TestFile type).
Lints are restored in Ladybug 2024.2.2 Canary 4
Test: existing tests pass
Test: manual test lints in ide
Bug: 371463741
Change-Id: I1be3d7dc113f799e17314008efc5d914c6cb8ee7
Files:
- A
navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/CompatUtil.kt
- M
navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt
- M
navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt
- M
navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/WrongStartDestinationTypeDetectorTest.kt
- A
navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/CompatUtil.kt
- M
navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt
- M
navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt
- M
navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/WrongStartDestinationTypeDetectorTest.kt
- M
navigation/navigation-lint-common/build.gradle
- M
navigation/navigation-lint-common/src/main/java/androidx/navigation/lint/common/LintUtil.kt
- A
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/CompatUtil.kt
- M
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt
- M
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt
- M
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/Stubs.kt
- M
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongNavigateRouteDetectorTest.kt
- M
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongPopBackStackRouteDetectorTest.kt
- M
navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt
Hash: 0d96ef8a46b375f19f388a4ad1b5021a50733870
Date: Fri Oct 04 07:10:34 2024
jb...@google.com <jb...@google.com> #3
This has been fixed internally and will be available in the Navigation 2.8.3
release.
Description
navigation-lint-common
hosts test helpers that generatesTestFile
.However, b/368070326 . Instead, it should be in test-specific source sets.
TestFile
is for test only and should not reside in production code. It leads toWe should refactor lint-common code into a new structure with common and common-test submodules
This was done in these CLs aosp/3284996 . But this fix is blocked by recent bytecode migration in ag/29027860 . During migration, the existing path workaround , so this new path breaks presubmit. Thread for context.
"navigation:navigation-lint-common"
was hardcoded into aWhile waiting for an updated workaround or a patch from lint infra, we should in the meantime copy paste
TestFile
related code into each lint test artifact so that we restore lint in the mean time.