google / google/ksp

Tests depending on `IncrementalContextAA.dumpLookupRecords`

Open
#3,019 0 comments 0 reactions 0 assignees View on GitHub
api core enhancement incremental P4
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

There are a handful of tests that depend on the `IncrementalContextAA.dumpLookupRecords` function which should be private. The tests rely on the following processors:
- `RecordJavaAsMemberOfProcessor`
- `RecordJavaGetAllMembersProcessor`
- `RecordJavaOverridesProcessor`
- `RecordJavaProcessor`
- `RecordJavaSupertypesProcessor`

It seems that these tests are interested in a trace of what was looked up, presumably to check correctness of incremental compilation, so maybe such functionality can be exposed in a debug mode or via logging options. Another solution is to have a white-box testing suite, where we allow access to private methods via reflection, although this seems brittle. The former option also seems to be useful for debugging, so that's perhaps another argument in favor of a configurable function.

Contributor guide

Open the contributing guide

Research direction

Start by examining IncrementalContextAA.dumpLookupRecords and the tests using RecordJavaAsMemberOfProcessor, RecordJavaGetAllMembersProcessor, RecordJavaOverridesProcessor, RecordJavaProcessor, and RecordJavaSupertypesProcessor. Determine how the lookup trace is needed for incremental-compilation correctness and define a supported debugging or testing access path; done means those tests no longer depend directly on the private function.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.