mordant icon indicating copy to clipboard operation
mordant copied to clipboard

MacOs arm64

Open vaclavbenes opened this issue 1 year ago • 3 comments

Is there any workaround for running this sample code on macOS arm64? In my case, inputs are ignored.

fun main() {
    val terminal = Terminal()
    val selection = terminal.interactiveSelectList(
        listOf("Small", "Medium", "Large", "X-Large"),
        title = "Select a Pizza Size",
    )
    if (selection == null) {
        terminal.danger("Aborted pizza order")
    } else {
        terminal.success("You ordered a $selection pizza")
    }
}

same stuff working on Linux. Thx

vaclavbenes avatar Jun 29 '24 20:06 vaclavbenes

JVM or native?

ajalt avatar Jun 29 '24 23:06 ajalt

Jvm . I didn't try native.

vaclavbenes avatar Jun 30 '24 06:06 vaclavbenes

I'm guessing it's the same issue as #86, where JNA just doesn't support macos arm64 well. Maybe a future JNA release will improve that, but really I think the solution is to implement an FFM version of all the syscall code. FFM has its own drawbacks, but at least it should work.

I'll update the docs to mention support.

ajalt avatar Jun 30 '24 16:06 ajalt

Native is also not working for me. Just doing

fun main() {
  Terminal().interactiveSelectList(listOf("a", "b"))
}

JakeWharton avatar Jul 24 '24 02:07 JakeWharton

Native is also not working for me.

Does the list show up but inputs are ignored? Or are you seeing some other problem?

ajalt avatar Jul 24 '24 17:07 ajalt

Yes it renders properly, it just doesn't respond to any input.

JakeWharton avatar Jul 24 '24 17:07 JakeWharton