fusesource / jansi

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
http://fusesource.github.io/jansi/
Apache License 2.0
1.11k stars 140 forks source link

Add setenv and chdir methods to the CLibrary #196

Closed gnodet closed 3 years ago

oxc commented 3 years ago

Could you explain why this was added? It does not seem to be called from the java code?

gnodet commented 3 years ago

They are both required by mvnd : https://github.com/mvndaemon/mvnd/blob/34779fd7a0279b8b4f54a93dcb85d373c5560d51/daemon/src/main/java/org/apache/maven/cli/DaemonMavenCli.java#L668-L673

oxc commented 3 years ago

I see. Sounds to me that it was convenient to add them to Jansi because the infrastructure already exists, but they shouldn't really be in here but in a separate library. They seem to have nothing to do with Ansi terminal handling, and are not needed by any "normal" users of this library.

I have recently added a Pull request to a project introducing Jansi, and they have raised concerns about whether the library introduces any hard to control native behavior. I must agree that having unused functions in the native blobs that are not even used by the first party library feels somewhat conspicuous.

garydgregory commented 3 years ago

I agree with you, this belongs in something like JNA if it's not already in there ;-)

Gary

On Wed, Apr 7, 2021, 07:54 Bernhard Frauendienst @.***> wrote:

I see. Sounds to me that it was convenient to add them to Jansi because the infrastructure already exists, but they shouldn't really be in here but in a separate library. They seem to have nothing to do with Ansi terminal handling, and are not needed by any "normal" users of this library.

I have recently added a Pull request to a project introducing Jansi, and they have raised concerns about whether the library introduces any hard to control native behavior. I must agree that having unused functions in the native blobs that are not even used by the first party library feels somewhat conspicuous.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fusesource/jansi/issues/196#issuecomment-814852569, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJB6NYAV3AXTLCETUKIPTTTHRBVTANCNFSM4XNUS4SQ .