Support static native images (fix #246)#270
Support static native images (fix #246)#270Glavo wants to merge 13 commits intofusesource:masterfrom
Conversation
…#247) (fusesource#258) * Fix wrong output encoding on Windows with JDK >= 19 JDK 19 has changed the system properties used for System.out and System.err encoding, see https://www.oracle.com/java/technologies/javase/19-relnote-issues.html#JDK-8283620 * Fix bad background in logo and add output encoding system properties
- the minimal build requirement is bumped to JDK 21 - FFM is the default provider if available (JDK >= 21 with --enable-preview flag)
|
@rsenden It's working! |
src/main/java/org/fusesource/jansi/internal/musl/AnsiConsoleSupportImpl.java
Outdated
Show resolved
Hide resolved
| Process process = null; | ||
| try { | ||
| process = new ProcessBuilder(command) | ||
| .redirectInput(ProcessBuilder.Redirect.INHERIT) |
There was a problem hiding this comment.
I think that's slightly wrong. The terminal width usually refer to the output rather than the input. See how it's handled in MingwSupport above. Else, a call such as echo foo | jansi would fail...
Btw, we may want to port the change I made earlier in JLine related to this: https://github.com/jline/jline3/pull/868/files
There was a problem hiding this comment.
I refactored MingwSupport to reuse its.
gnodet
left a comment
There was a problem hiding this comment.
Need to align with mingw support.
|
I have updated this PR and hope to have it reviewed again. However, before it is merged, I would like to rename the provider. |
|
I finally decided to rename the provider to |
|
@Glavo Many thanks for working on this, looking forward to see this included in an upcoming Jansi release. |

This PR provides a new implementation of
AnsiConsoleSupport. It uses the native image C interface to implementisattyand uses thestty sizecommand to implementgetTerminalWidth.I'm temporarily naming the provider
musl, but that's not an appropriate name and I'll change it later.