Skip to content

Support JLine Jansi. #2437

@garretwilson

Description

@garretwilson

The picocli code currently has some code to see if Jansi is installed, e.g.

// loading this class will load the native library org.fusesource.jansi.internal.CLibrary
Class<?> ansiConsole = Class.forName("org.fusesource.jansi.AnsiConsole");
Field out = ansiConsole.getField("out");
return out.get(null) == System.out;

In the notes to the recent Jansi 2.4.2 release, I noticed they say:

⚠️ WARNING
This library is no longer maintained. It has been merged into org.jline:jansi.
Please update your dependencies to use org.jline:jansi instead.

There wasn't much other information, but I suppose they are referring to JLine. In its GitHub repository, I see that there are indeed similar classes, for example org.jline.jansi.AnsiConsole.

Admittedly there is little information about which we should be using, but it's not unreasonable to interpret this as saying we should switch to org.jline.jansi.AnsiConsole going forward. I haven't made that switch in my application yet, but it looks like when I do, it would only work if picocli adds support for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme: integrationAn issue or change related to integration with other frameworks, shells or operating systemstheme: shellAn issue or change related to interactive (JLine) applicationstype: dependency 📚type: enhancement ✨

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions