Skip to content

Raise minimum IDE to 2025.3 and fix PSI read assertion in 2026.1.1#96

Merged
thinkAmi merged 2 commits into
epic/support_ide_2026from
feature/fix_ide_2026_error
May 10, 2026
Merged

Raise minimum IDE to 2025.3 and fix PSI read assertion in 2026.1.1#96
thinkAmi merged 2 commits into
epic/support_ide_2026from
feature/fix_ide_2026_error

Conversation

@thinkAmi
Copy link
Copy Markdown
Owner

@thinkAmi thinkAmi commented May 9, 2026

Background

This PR covers the RubyMine 2025.3+ support baseline and the RubyMine 2026.1.1 PSI read-access fix.

Supporting the affected IDE line requires updating the Gradle/Kotlin/IntelliJ Platform toolchain and raising the minimum IDE build to 253 (RubyMine 2025.3). With that baseline in place, RubyMine 2026.1.1 exposes a previously latent issue where route table UI rendering reads Ruby PSI from EDT-side getters.

Summary

  • Raise the minimum supported IDE build to 253 (RubyMine 2025.3).
  • Update the build/test setup for RubyMine 2025.3+.
  • Precompute SimpleRoute display values during route construction so UI rendering, filtering, and selection handling no longer dereference Ruby PSI outside a read action.
  • Keep SimpleRoute.navigate() unchanged so navigation still re-resolves against the latest PSI via ReadAction.nonBlocking.

Changes

  • Updated Kotlin, IntelliJ Platform Gradle Plugin, Gradle Wrapper, RubyMine build target, and since-build.
  • Added testBundledModule("com.intellij.modules.json") because the Ruby plugin registers JSON file-type extensions during test initialization.
  • Localized the runtime fix to SimpleRoute.kt while preserving the existing BaseRoute getter API.
  • Added SimpleRouteSnapshotTest for snapshot invariants, fallback titles, dynamic routes, unresolved routes, and action icon dispatch.

Notes

  • Display values are now snapshots until the next Rails Routes run. This matches the existing routes-list behavior.
  • Icon dispatch is tested through a pure helper instead of constructing real Ruby PSI in BasePlatformTestCase, where Ruby plugin service setup is heavy.

Testing

  • ./gradlew check
  • ./gradlew test --tests '*SimpleRouteSnapshotTest*'
  • Manual: RubyMine 2026.1.1 route row selection no longer raises the read-access assertion.

thinkAmi and others added 2 commits May 8, 2026 20:21
RubyMine 2026.1.1 throws "Read access is allowed from inside read-action only"
when a row is selected in the routes table, because SimpleRoute lazily reads
RailsAction.psiClass / psiMethod from getQualifiedActionTitle / getActionIcon /
canNavigate / methodExists, all of which are invoked from the EDT (MainContent,
ActionCellRenderer, RoutesTable double-click, RoutesTableFilter) outside of a
read action.

Capture the display-side values at init time inside the same ReadAction.run
block as railsAction.update(), and have the getters return the cached snapshot.
Navigation keeps using the existing ReadAction.nonBlocking re-resolution path
so the jump target is still based on the latest PSI.

Extract icon dispatch into a pure resolveActionIcon() helper so each branch
(NodeRouteAction / NodeController / Unknown) can be unit-tested without the
Ruby plugin services that are otherwise required to instantiate real RClass /
RMethod under BasePlatformTestCase.

Add SimpleRouteSnapshotTest covering: snapshot immutability, all three icon
dispatch branches, default state with no Rails app, dynamic ":controller"
routes, and the nested controller fallback (admin/users -> Admin::UsersController).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thinkAmi thinkAmi merged commit 63df9a3 into epic/support_ide_2026 May 10, 2026
4 checks passed
@thinkAmi thinkAmi deleted the feature/fix_ide_2026_error branch May 10, 2026 00:01
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