Repository navigation
fix: Keep Spring inspections unavailable while the IDE indexes instead of throwing IndexNotReadyException (242) (#688) - #705
Closed
imuromtsev wants to merge 2 commits into
Conversation
…d of throwing IndexNotReadyException (#688)
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. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of
fix: Keep Spring inspections unavailable while the IDE indexes instead of throwing IndexNotReadyException (#688)(
mainsquashf3e9b2e87, 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 ofrelease/242, so the fix ships with that generation rather thanre-releasing an already published one.
What changed
InspectionAvailabilityinmodules/base:isIndexReady(file)andhasLibraryClass(file, fqn)check dumb mode beforeany index lookup.
super(SpringBoot3JakartaMigrationInspection,SpringDataBaseUastLocalInspectionTool,SpringJdbcClientParamInspection) go through it.LibraryClassCacheis unchanged: a cold lookup during indexing still throwsIndexNotReadyException, which is the platform'sretry 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
SpringBaseUastLocalInspectionToolandSpringDataBaseUastLocalInspectionToolkeep this line's own shape (noPluginIdsterm in the Spring Data override); only the availability call was changed.
SpringWebBaseUastLocalInspectionTooldoes not exist on this line, so its hunk and the spring-web test are left out.maincommit.Verification
Two commits: a test-only red commit, then the fix.
2ff0a2b62): the new dumb-mode tests fail on this line's sources — spring-core 5 of 7, spring-data 2 of 2 fail withAssertionError: Threw in dumb mode: IndexNotReadyException. The twoLibraryClassCachecontract tests pass in both phases,as intended.
f99a51563):compileTestKotlinplus 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.
NativeSyncDumbModeTestandEventListenerLibraryCrossModuleTest, which predate this PR and are untouched by it.