Skip to content

Keep source roots with transient usages indexes in SourcePath - #9801

Open
mbien wants to merge 1 commit into
apache:masterfrom
mbien:lost-and-found
Open

mbien wants to merge 1 commit into
apache:masterfrom
mbien:lost-and-found

Conversation

@mbien

@mbien mbien commented Nov 13, 2026

Copy link
Copy Markdown
Member

SourcePath filtered the source path to roots whose usages index passed hasSourceCache(root, true), which only sees persistent, INITIALIZED indices.

Roots with a transient index (lazily created at project load, not re-indexed in the current session) were silently dropped, so sources-only Find Usages searches missed their usages.

Use hasSourceCache(root, false), which also sees transient indices and does not require INITIALIZED, matching what
ClassIndex.createQueriesForRoots queries anyway.

Adds a regression test in SourcePathTest reproducing the transient index state.

fixes #9685

Assisted-by: qwen3.8-27b

SourcePath filtered the source path to roots whose usages index
passed hasSourceCache(root, true), which only sees persistent,
INITIALIZED indices. Roots with a transient index (lazily created at
project load, not re-indexed in the current session) were silently
dropped, so sources-only Find Usages searches missed their usages.

Use hasSourceCache(root, false), which also sees transient indices
and does not require INITIALIZED, matching what
ClassIndex.createQueriesForRoots queries anyway.

Adds a regression test in SourcePathTest reproducing the transient
index state.

Assisted-by: qwen3.8-27b
@mbien mbien added this to the NB33 milestone Nov 13, 2026
@mbien mbien added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find usages shows no results

1 participant