Skip to content

fix: Keep Spring inspections unavailable while the IDE indexes instead of throwing IndexNotReadyException (242) (#688) - #705

Closed
imuromtsev wants to merge 2 commits into
imuromtsev/release-242-gen35from
imuromtsev/release-242-gen35-dumb-mode
Closed

imuromtsev wants to merge 2 commits into
imuromtsev/release-242-gen35from
imuromtsev/release-242-gen35-dumb-mode

Conversation

@imuromtsev

Copy link
Copy Markdown
Collaborator

Backport of fix: Keep Spring inspections unavailable while the IDE indexes instead of throwing IndexNotReadyException (#688)
(main squash f3e9b2e87, PR #694) to the 242 line.

Refs #688

Why this base

The defect shipped in generation 34, so it is live on every supported line. This PR targets the generation-35 wave branch
imuromtsev/release-242-gen35 (PR #330) instead of release/242, so the fix ships with that generation rather than
re-releasing an already published one.

What changed

  • New InspectionAvailability in modules/base: isIndexReady(file) and hasLibraryClass(file, fqn) check dumb mode before
    any index lookup.
  • The inspection base classes and the overrides that skip super (SpringBoot3JakartaMigrationInspection,
    SpringDataBaseUastLocalInspectionTool, SpringJdbcClientParamInspection) go through it.
  • LibraryClassCache is unchanged: a cold lookup during indexing still throws IndexNotReadyException, which is the platform's
    retry signal, and the [BUG] Native sync discards a fully collected bean context when a VFS refresh starts dumb mode #433 contract test keeps pinning that behaviour.

Line-specific adaptations

  • SpringBaseUastLocalInspectionTool and SpringDataBaseUastLocalInspectionTool keep this line's own shape (no PluginIds
    term in the Spring Data override); only the availability call was changed.
  • SpringWebBaseUastLocalInspectionTool does not exist on this line, so its hunk and the spring-web test are left out.
  • The other five files are byte-identical to the main commit.

Verification

Two commits: a test-only red commit, then the fix.

  • Red (2ff0a2b62): the new dumb-mode tests fail on this line's sources — spring-core 5 of 7, spring-data 2 of 2 fail with
    AssertionError: Threw in dumb mode: IndexNotReadyException. The two LibraryClassCache contract tests pass in both phases,
    as intended.
  • Fix (f99a51563): compileTestKotlin plus the same classes, all green — spring-core 7, spring-data 2.

Counts come from the JUnit XML of each phase. The full suite is left to CI on this PR.

  • Note: the gen35 CI of this line is already red in NativeSyncDumbModeTest and EventListenerLibraryCrossModuleTest, which predate this PR and are untouched by it.

@imuromtsev

Copy link
Copy Markdown
Collaborator Author

Closing: the generation-35 wave is refreshed from main in one pass, and f3e9b2e (#694) is inside that pending range, so the pass replays this fix itself. Merging it separately would only add a cherry-pick --skip step. The per-line verification done here (red on the test-only commit, green with compileTestKotlin on the fix, on 242-261) is recorded in COMPATIBILITY.md for the pass.

@imuromtsev imuromtsev closed this Oct 14, 2026
@github-actions

Copy link
Copy Markdown
TestsPassed ☑️Skipped ⚠️Failed ❌️
JUnit Test Report2188 ran2179 passed6 skipped3 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant