Skip to content

libuv is a problem #134

@mhermier

Description

@mhermier

Hi,

In an attempt to unite wrenalyzer and wrencli (with the aim to modernize them) I toyed a lot more with this repo, and came to the conclusion that libuv is a problem.

There are good parts with it, but there are some issues that will be hard/impossible to circumvent. Due to the API decision to froze their API for eternity (till they change their mind):

  • We can't produce a proper binding. I proposed a patch to improve the situation that landed in their master branch a while ago, but because they reinforced their opinion, libuv version 2 will never probably happen. So the binding options is not possible in a near future (in a sane manner).
  • TTY handling in libuv is a mess (well it is a mess on most platform, but their API is broken somehow, and since it is frozen for eternity...). Unless I missed something, I was unable to start ANSI colors on windows terminal without introducing platform code in wren (which somehow defeat the point of using libuv). Even without that, even in their latest version, there is no option to trigger ENABLE_VIRTUAL_TERMINAL_INPUT which would solve a bunch of problem like [BUG] "Unhandled key-code [dec]: 8" on Backspace #131 and unify input handling in wrencli.

Changing ObjForeign so it so that it could have fields would helps to solve the first to some extends, but it would not solve the second point.

The biggest annoyance is that there is no real alternative solution AFAIK. We can fork libuv and fix the issues I noted, but we will end up to have to maintain it, and considering the slow pace of the wren project it doesn't seems to be viable. We can abandon it, to have our own event library, which does not seems more realistic either considering the platform differences...

Any idea/comment is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions