fix: backport bugfixes from master to 4.0.x#1840
Conversation
* Fix AttributedStyle color chaining * Update terminal/src/test/java/org/jline/utils/AttributedStyleTest.java * Update terminal/src/test/java/org/jline/utils/AttributedStyleTest.java --------- Co-authored-by: Guillaume Nodet <gnodet@gmail.com>
…1813) When a LineDisciplineTerminal is created with a null masterOutput (e.g. via TerminalBuilder.builder().system(false).build()), closing the terminal triggers a NullPointerException in FilteringOutputStream's flush() and close() methods. Add null guards for masterOutput in all code paths.
…#1808) (#1817) On macOS, closing a file descriptor from one thread does not reliably unblock a read() blocked on the same fd in another thread. The pumpOut thread in PosixPtyTerminal blocks on masterInput.read(), and pty.close() was unable to unblock it. Fix by closing the slave output first, which signals EOF on the master side via the kernel's PTY layer, reliably unblocking pumpOut on all platforms. Also close masterInput directly before pty.close(). Restore try-with-resources in FfmTest now that terminals close cleanly.
…image (#1802) * fix: register all FFM foreign function signatures for GraalVM native-image Add missing downcall/upcall entries in reachability-metadata.json for sigaction, Kernel32 Windows APIs, and FfmSignalHandler's signalReceived upcall. Goes from 6 downcalls/0 upcalls to 16 downcalls/1 upcall. Four Kernel32 entries using struct-by-value COORD are excluded because GraalVM's metadata parser does not support nested arrays. Also add native-image CI job testing both FFM and JNI profiles on ubuntu and macOS with GraalVM CE 25. * fix: add exec provider fallback to native-image --check mode * fix: enhance native-image --check with provider and terminal integration tests Exercise FFM downcalls via isSystemStream() and verify terminal creation with TerminalBuilder. * fix: suppress S106 SonarCloud warning in Graal check() method * fix: correct import ordering in Graal.java
Redirect and input redirect paths were parsed via Paths.get() in the default FileSystem. They are now resolved against the session's working directory so that relative paths resolve correctly and absolute paths inherit the session's FileSystem. (cherry picked from commit 699c202)
…nal (fixes #1821) (#1822) The MasterOutputStream in VirtualTerminal used Charset.defaultCharset() to decode bytes, which on Windows is typically Windows-1252 instead of UTF-8. This caused multi-byte UTF-8 characters like the ellipsis (U+2026) to be garbled, making StatusTest.testStatusLineTruncation fail on Windows.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|


Summary
Backport of bugfixes from master to the 4.0.x release branch:
Test plan
./mvx mvn install -DskipTests)