Closed hubvd closed 3 months ago
My bad for not mentioning this in the initial native-image PR, it also took me quite a while to figure this out. I don't have a windows computer setup right now, but if you want, I can try to check the windows part this weekend ?
Amazing! I have no idea how you figured this out. Thank you!
The tests are failing because a struct definition is wrong on macos, but that's my fault, not yours. I'll merge now and fix it is a separate PR.
The issue with
Expected Object but got Word
when compiling the native image comes from the fact that the kotlin compiler insert null checks if the used types are not nullable.For example, if we declare tcgetattr as
Every call to it will be compiled as
It is possible to disable those checks with the following compiler parameters: -Xno-param-assertions, -Xno-call-assertions,-Xno-receiver-assertions.
But in this case, it is enough to simply mark the termios parameter as nullable.