Skip to content

fix(car): suppress INVISIBLE_MEMBER in CarScreensTest for fdroid build#6010

Merged
jamesarich merged 1 commit into
mainfrom
claude/flamboyant-ellis-e711dc
Jun 29, 2026
Merged

fix(car): suppress INVISIBLE_MEMBER in CarScreensTest for fdroid build#6010
jamesarich merged 1 commit into
mainfrom
claude/flamboyant-ellis-e711dc

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

🐛 Bug Fix

:feature:car:testFdroidDebugUnitTest failed to compile (the google variant passed). CarScreensTest.kt calls CarStateCoordinator.setStateForTest(...), which is internal in production code, so the fdroid unit-test compilation reported:

Cannot access 'fun setStateForTest(...)': it is internal

Why

The sibling test in the same directory, CarScreenDataBuilderTest.kt, already works around this with a file-level @file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER"). CarScreensTest.kt was missing it — a pre-existing regression introduced by #5997, unrelated to the work where it was discovered.

Fix

Add the matching @file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") above the package declaration in CarScreensTest.kt.

Testing Performed

Both variants now compile and pass (43 tests each):

./gradlew :feature:car:testFdroidDebugUnitTest :feature:car:testGoogleDebugUnitTest

CarScreensTest calls CarStateCoordinator.setStateForTest(), which is
internal. The fdroid unit-test compilation failed with "Cannot access
'setStateForTest': it is internal" while google passed. The sibling
CarScreenDataBuilderTest already works around this with a file-level
@Suppress; CarScreensTest was missing it (regression from #5997).

Verified: :feature🚗testFdroidDebugUnitTest and
:feature🚗testGoogleDebugUnitTest both pass (43 tests each).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the bugfix PR tag label Jun 29, 2026
@jamesarich jamesarich merged commit 8cc8185 into main Jun 29, 2026
16 checks passed
@jamesarich jamesarich deleted the claude/flamboyant-ellis-e711dc branch June 29, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant