Skip to content

fix: Add deprecated no-op jansi/jna methods to TerminalBuilder#1710

Merged
gnodet merged 1 commit intomasterfrom
fix/jansi-jna-compat
Mar 23, 2026
Merged

fix: Add deprecated no-op jansi/jna methods to TerminalBuilder#1710
gnodet merged 1 commit intomasterfrom
fix/jansi-jna-compat

Conversation

@gnodet
Copy link
Copy Markdown
Member

@gnodet gnodet commented Mar 23, 2026

Summary

  • Add deprecated no-op jansi(boolean) and jna(boolean) methods to TerminalBuilder for backwards compatibility with JLine 3

In JLine 3, TerminalBuilder.builder().jansi(true) and .jna(true) were used to enable native terminal support. JLine 4 replaced these with its own FFM/JNI providers that are used automatically, so the methods were removed. However, libraries like TamboUI still call these methods, causing NoSuchMethodError when used with JLine 4.

The methods are added back as deprecated no-ops so that existing JLine 3 code compiles and runs against JLine 4 without changes.

Test plan

  • Builds successfully
  • No functional change — methods are no-ops

…Builder

In JLine 3, TerminalBuilder.jansi(true) and .jna(true) were used to
enable native terminal support. JLine 4 replaced these with its own
FFM/JNI providers that are used automatically, so the methods were
removed. However, libraries like TamboUI still call these methods,
causing NoSuchMethodError when used with JLine 4.

Add the methods back as deprecated no-ops so that existing JLine 3
code compiles and runs against JLine 4 without changes.
@gnodet gnodet merged commit 27a26ab into master Mar 23, 2026
9 checks passed
@gnodet gnodet deleted the fix/jansi-jna-compat branch March 23, 2026 12:47
@gnodet gnodet added this to the 4.0.9 milestone Mar 31, 2026
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