…th intellijPlatformDiscover (#2063)
## Summary
"Latest IJ" (`IJ-latest.yml`) is meant to build and test LSP4IJ against the newest IntelliJ build every night. It can't do that any more, and in my fork every run since 2026-11-12 failed:
```
* What went wrong:
For input string: "redirector"
java.lang.NumberFormatException: For input string: "redirector"
at Build_gradle.<init>(build.gradle.kts:37)
```
The workflow found the version with
```
./gradlew printProductsReleases | grep 'IC-' | head -n 1 | cut -d'-' -f2
```
Claude Code found three problems with it:
- From 2025.3 on, the list of releases has only IntelliJ IDEA (IU), so only IU has the newest builds, such as the 2026.3.1 EAP 263.8311.30; the IntelliJ Maven repository still has IC (`ideaIC` 2025.3 to 2026.3). Even when `grep 'IC-'` finds a version line, the newest one in the list is IC 2025.2.6.4, older than what `ci.yml` already tests.
- `grep 'IC-'` matches any line of the Gradle output with `IC-` in it. The likeliest one is a download URL such as `https://cache-redirector.jetbrains.com/…/ideaIC-2024.2.zip`, printed before the versions when the IDE is not cached yet, so `cut` gave `redirector`. The command substitution swallows the output, so the log can't confirm the exact line.
- The pipe ends with `cut`, which succeeds, so the step went on with a wrong version instead of failing.
The workflow is disabled in this repository, so the failures only show in forks where it runs.
## Changes
`IJ-latest.yml` only; `build.gradle.kts` and `ci.yml` are unchanged.
- A new step "Find the newest IntelliJ IDEA" asks `intellijPlatformDiscover --kind=releases --type=IU` (IntelliJ Platform Gradle Plugin) for the IU releases as JSON and takes, with `jq`, the build with the highest build number over all channels: the current EAP or RC if there is one, else the newest release.
- `build.gradle.kts` takes the IDE from the IntelliJ Maven repository (`useInstaller = false`), where a release has its version (`2026.3`) and an EAP, RC or other preview build is `<build number>-EAP-SNAPSHOT`. The bare build number `263.8311.30` is not found there, so the step gives Gradle `263.8311.30-EAP-SNAPSHOT`, or the version for a release.
- The step fails with an error when no release is found, instead of building with an empty or wrong version.
- "Build with Gradle" runs `./gradlew check -PplatformType=IU -PplatformVersion=<version>`.
- The log lists the 10 newest IU builds, and the job summary says which one was tested:
```
The 10 newest IntelliJ IDEA (IU) builds:
263.8311.30 2026.3.1 EAP
263.7307.200 2026.3 RELEASE
263.7307.112 2026.3 RC
263.7307.44 2026.3 EAP
…
Newest IntelliJ IDEA: 263.8311.30 2026.3.1 EAP
Platform version for Gradle: 263.8311.30-EAP-SNAPSHOT
Newest IntelliJ IDEA release: 2026.3, ci.yml tests: 2026.3
```
- `ci.yml` tests pull requests against a fixed IU release (2026.3), on purpose, so that a new release doesn't turn unrelated pull requests red. "Latest IJ" now reads, with `yq`, the highest IU release that `ci.yml` tests (an entry without `platformType` or `platformVersion` takes the one of `gradle.properties`) and compares it with the newest release. When a newer release is out, it writes a warning into the annotations and the job summary, without failing:
> ci.yml tests IntelliJ IDEA 2026.3, but the newest release is 2026.3.1. Update its matrix entry with platformType IU.
2026.3 was released on 2026-11-05 and came into `ci.yml` with #1931 on 2026-11-11; with this check, the nightly run of 2026-11-06 would have pointed it out.
## Possible follow-up
#2062, left out to keep this pull request small:
- Variant 1 (proposed): while `ci.yml` is behind, "Latest IJ" also tests the newest release, so the warning says whether moving `ci.yml` would pass.
- Variant 2 (feasible, set aside for now): `ci.yml` takes the newest release by itself; that would turn every open pull request red on the day of a release.
## Tests
- Runs of "Latest IJ" on this branch in my fork, started with `workflow_dispatch`:
- [44875014196](https://github.com/muescha/lsp4ij/actions/runs/44875014196): found 263.8311.30, but the build failed with `Could not find com.jetbrains.intellij.idea:idea:263.8311.30`, which led to the `-EAP-SNAPSHOT` notation.
- [44875216897](https://github.com/muescha/lsp4ij/actions/runs/44875216897): passes, all tests against `263.8311.30-EAP-SNAPSHOT`.
- [44876732170](https://github.com/muescha/lsp4ij/actions/runs/44876732170): passes, with the list of builds and the `ci.yml` check in the log (no warning, `ci.yml` is up to date).
- The last commit, which takes the highest of several IU entries of `ci.yml`, ran locally only, with `yq` 4.54.3 on seven setups: today's `ci.yml`, `2025.3` with IU as well, an extra IU entry with an older and with a newer release, `platformType=IU` in `gradle.properties`, and no IU entry with an IC or an IU default. Each gave the expected version, or none.
- The `jq` selection ran locally on the current releases (`263.8311.30-EAP-SNAPSHOT`), on the releases only (`2026.3`) and on an empty list (no version, so the step fails).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Important
Request for comments: this is a proposal, not something to merge as it is. The two new jobs make CI do more work on every push to a pull request, and the project may not have the budget for that, or may not want the extra load. Please comment before merging. The costs and some cheaper alternatives are at the end.
Fixes #1908, with #1910 and #1681, which fixed the four other failures that it lists.
CI ran the tests only on the platform version of
gradle.properties, IntelliJ IDEA Community 2024.2. This adds two jobs on Linux: one on IntelliJ IDEA Community 2025.3, and one on the newest release, the unified IntelliJ IDEA 2026.3 (platformType=IU). #1921 was a failure on 2026.3 that only tests there could have caught: the code compiles and links, and the plugin verifier passes.Building and testing against 2026.3
maindidn't build against 2026.3, and on the unified IntelliJ IDEA 2026.3, 70 of its tests failed:settings.gradle.kts.DocumentEventImpland renamedEditorTracker.setActiveEditorstosetActiveEditorsInTests.WorkspaceEditVersionTestnow makes aDocumentEventof its own, andCodeActionsOnTheEdtTestcalls the setter that the platform has..js,.tsand.cssfiles of the tests that IntelliJ IDEA Community leaves to LSP4IJ: the files get the plugins' PSI, formatter and folding. All 70 failures were in such tests. The test sandbox now disables both plugins, throughprepareTestSandbox.disabledPlugins, and with them their dependents, such as Angular and Tailwind CSS. Every other plugin still loads. Community has neither plugin, so there, this changes nothing.None of this changes the build for older versions: the toolchain and the modules are for 2026.3 on, disabling the two plugins does nothing in Community, and the two tests work on every version. Locally:
checkpasses on 2026.3.Cost, and alternatives
The new jobs run alongside the others, so as long as they finish before the slowest check, a pull request waits no longer. On the second run of this PR, both passed: 2026.3 in 12.2 minutes and 2025.3 in 9.7, against 7.3 for 2024.2 on Linux. They download their IDE, and 2026.3 also a larger one and Java 25. The slowest checks of that run were the tests on macOS, 13.5 minutes, and the plugin verifier, 11.2, so the pull request didn't wait longer. But the job of 2026.3 took longer than the verifier there, and the tests on macOS took 9 to 13 minutes on recent runs, so on some runs it will be the slowest check, by a minute or two.
They aren't free, though:
Cheaper alternatives:
mainthen builds and tests against 2026.3, and anyone can run./gradlew check -PplatformType=IU -PplatformVersion=2026.3locally, with no new jobs.IJ-latestworkflow, which hasn't run since November 2025.@angelozerr, which would you prefer?
Details of the jobs:
Test (ubuntu-latest). The new ones areTest (ubuntu-latest, 2025.3)andTest (ubuntu-latest, 2026.3). Their test results get artifacts of their own, and only the job of 2024.2 on Linux uploads coverage, as before.