Visitar URL original
fix: add GraalVM native-image support for FFM terminal provider by gnodet · Pull Request #1804 · jline/jline3 · GitHub
Skip to content

fix: add GraalVM native-image support for FFM terminal provider - #1804

Merged
gnodet merged 2 commits into
3.30.xfrom
backport/3.30.x/native-image-metadata
Apr 23, 2026
Merged

gnodet merged 2 commits into
3.30.xfrom
backport/3.30.x/native-image-metadata

Conversation

@gnodet

@gnodet gnodet commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Backport of fix: register all FFM foreign function signatures for GraalVM native-image #1802 to 3.30.x branch
  • Add reachability-metadata.json with FFM foreign function signatures (passive on GraalVM 23, active on GraalVM 25+)
  • Add CI native-image build job using GraalVM CE 23 with existing native-image-maven-plugin:21.2.0
  • Enhanced --check smoke test that exercises provider.isSystemStream() and creates/closes a terminal via TerminalBuilder
  • Provider fallback chain: ffm, jni, jansi, jna, exec

Relates to tamboui/tamboui#276

Test plan

  • CI native-image job passes on Linux and macOS with GraalVM CE 23
  • graal --check outputs provider name, system stream status, and terminal creation confirmation
  • Existing native-image infrastructure preserved (old plugin, no GraalVM upgrade required)

@coderabbitai

coderabbitai Bot commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 91d402b5-7e97-4606-96b1-bb28e72c217e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch backport/3.30.x/native-image-metadata

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gnodet
gnodet force-pushed the backport/3.30.x/native-image-metadata branch 2 times, most recently from ff313b0 to d521a10 Compare April 22, 2026 21:08
Add reachability-metadata.json with foreign downcall signatures for
CLibrary (6) and Kernel32 (9) FFM functions. Four Kernel32 entries
using struct-by-value COORD are excluded (GraalVM metadata parser
rejects nested arrays). This metadata is picked up by GraalVM 25+
for native-image builds using the FFM terminal provider.

Add --check smoke test mode to Graal demo that exercises provider
loading, isSystemStream() FFM downcalls, and terminal creation.
Add native-image CI job using GraalVM CE 23.
@gnodet
gnodet force-pushed the backport/3.30.x/native-image-metadata branch from d521a10 to 859ecee Compare April 23, 2026 08:20
@sonarqubecloud

Copy link
Copy Markdown

@gnodet
gnodet merged commit e052063 into 3.30.x Apr 23, 2026
13 checks passed
@gnodet
gnodet deleted the backport/3.30.x/native-image-metadata branch April 23, 2026 20:27
gnodet added a commit that referenced this pull request Apr 27, 2026
* fix: add GraalVM native-image FFM foreign function metadata

Add reachability-metadata.json with foreign downcall signatures for
CLibrary (6) and Kernel32 (9) FFM functions. Four Kernel32 entries
using struct-by-value COORD are excluded (GraalVM metadata parser
rejects nested arrays). This metadata is picked up by GraalVM 25+
for native-image builds using the FFM terminal provider.

Add --check smoke test mode to Graal demo that exercises provider
loading, isSystemStream() FFM downcalls, and terminal creation.
Add native-image CI job using GraalVM CE 23.

* fix: suppress S106 SonarCloud warning in Graal check() method
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