Skip to content

SLE-1443 Migrate to Java 21 for the backend#1020

Merged
damien-urruty-sonarsource merged 4 commits intomasterfrom
task/dam/try-java-21-build
Mar 26, 2026
Merged

SLE-1443 Migrate to Java 21 for the backend#1020
damien-urruty-sonarsource merged 4 commits intomasterfrom
task/dam/try-java-21-build

Conversation

@damien-urruty-sonarsource
Copy link
Copy Markdown
Contributor

No description provided.

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod bot changed the title Update to Java 21 SLCORE SLE-1443 Update to Java 21 SLCORE Mar 17, 2026
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod bot commented Mar 17, 2026

SLE-1443

@damien-urruty-sonarsource damien-urruty-sonarsource marked this pull request as ready for review March 24, 2026 11:42
@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha bot commented Mar 24, 2026

Summary

This PR is a comprehensive infrastructure migration and project restructuring for SonarLint Eclipse. It upgrades the version to 12.0.0 and establishes the project's CI/CD pipeline with GitHub Actions workflows, adds testing infrastructure for multiple Eclipse/Java versions (including Java 21 support), and refactors the build system. The changes include 1,088 files with ~66K insertions, establishing root-level Maven configuration, GitHub Actions workflows (build, release, PR management, security scanning), build automation scripts, target platform definitions for testing, and a complete integration test suite with test project templates.

What reviewers should know

Start here:

  • Review .github/workflows/build.yml - this is the main CI/CD pipeline; note the test matrix includes latest-java-21 target platform alongside 11 and 17
  • Check pom.xml (root) - establishes parent project version 12.0.0 and Maven configuration; source/target remain Java 11 for compatibility
  • Review target-platforms/*.target files - defines Eclipse/Java combinations for testing; latest-java-21.target is the new Java 21 target

Key architectural decisions:

  • Minimum Java version stays at 11, but CI now tests against Java 21 via Tycho target platforms (this allows the plugin to run on newer Java while maintaining compatibility)
  • Maven 3 + Tycho 4.0.12 build system; uses mise for JDK management
  • Extensive integration test framework in its/ directory with separate test modules for different scenarios (standalone, connected mode, CDT, etc.)

Non-obvious elements:

  • sloop.version property (11.0.0.85168) in pom.xml ties the embedded SonarLint Core version - verify this is correct
  • GitHub workflows include expensive matrix builds across 4+ configurations - watch for CI time/cost
  • .github/scripts/ contains critical build scripts (Maven toolchain setup, version management) - pay attention to conditional logic and environment setup
  • Integration tests use RedDeer for UI automation and require Xvfb display server - infrastructure-heavy
  • Version bump to 12.0.0 is significant; confirm this aligns with release strategy

  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@thahnen
Copy link
Copy Markdown
Contributor

thahnen commented Mar 24, 2026

Overall, I give this a 💯
I see SLE in good hands with you, much love and merci 🥳

sonar-review-alpha[bot]

This comment was marked as resolved.

@damien-urruty-sonarsource damien-urruty-sonarsource changed the title SLE-1443 Update to Java 21 SLCORE SLE-1443 Migrate to Java 21 for the backend Mar 24, 2026
@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/try-java-21-build branch 2 times, most recently from d12c147 to 09d554d Compare March 24, 2026 17:03
sonar-review-alpha[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@kirill-knize-sonarsource kirill-knize-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Couple nits on error logging.

Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

Solid PR. The Java 21 migration is clean — preference key rename with a well-tested migration path, version detection via the release file, and startup/preference-page warnings all hang together correctly. The timeout fix in SonarLintBackendService (join()get(1, TimeUnit.MINUTES)) is the headline reliability improvement and is handled correctly including interrupt restoration. No bugs found beyond the previously acknowledged self-managed JRE validation gap.

🗣️ Give feedback

@damien-urruty-sonarsource damien-urruty-sonarsource force-pushed the task/dam/try-java-21-build branch 2 times, most recently from 893ba25 to 6f7b7fa Compare March 26, 2026 15:16
@sonarqube-next
Copy link
Copy Markdown

@damien-urruty-sonarsource damien-urruty-sonarsource merged commit 0587b6e into master Mar 26, 2026
18 of 19 checks passed
@damien-urruty-sonarsource damien-urruty-sonarsource deleted the task/dam/try-java-21-build branch March 26, 2026 15:58
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.

3 participants