com-lihaoyi / os-lib

OS-Lib is a simple, flexible, high-performance Scala interface to common OS filesystem and subprocess APIs
Other
672 stars 63 forks source link

[WIP] Enable remaining Scala Native tests #274

Open lihaoyi opened 3 months ago

lihaoyi commented 3 months ago

These tests currently fail on Scala-Native, but pass on Scala-JVM, and do not have a reason they should not pass on Scala-Native as well

lihaoyi commented 3 months ago

@WojciechMazur any chance I could trouble you to look into these? The failures should be on the Scala-Native side of things

LeeTibbert commented 3 months ago

lihaoyi,

Thank you for the time you and others have spent adding support for Scala Native.

@WojciechMazur asked me to look at the macOS & Linux process related errors. I guess that I did not dust my fingerprints off that code carefully enough.

Through code inspection I have already discovered & PR'd one bug. isAlive() could incorrectly returning "true" after a process had really exited. Oops!

My next step is to run the reproducer which Wojciech has created against the most recently released Scala Native.

Then I might see if I can run it against a private build of Scala Native containing my fix from today. Who knows, sometimes magic happens.

Realistically, I think I will have to do some minimal private design studies where a pipe gets broken whilst one end is in waitfor. (I suspect the actually call is a waitfor(timeout) but that is suspicion, not evidence.)

I'll keep you posted, but it is probably doing to be multiple days between updates.

Does this fit in with your plan?

lihaoyi commented 3 months ago

Yes please take your time investigating, take as long as you need

LeeTibbert commented 3 months ago

I've found an additional bug in Scala Native 0.5.4-SNAPSHOT.

With a trial fix for that bug and the isAlive fix already in that version, the reproducer which Wojciech posted in Scala Native Issues works fine for me.

I hope to create a PR for Scala Native in the next day or so.

LeeTibbert commented 2 months ago

lolgab, Thank you for updating to Scala Native 0.5.4.

It looks like some of the tests are failing, linux & macOS. Is it evident to you that something is going wrong because of SN? That is, that something didn't get fixed and requires additional attention?

You have more experience and knowledge looking at these CI log files than I do.

Thank you for your time.

lihaoyi commented 2 months ago

@LeeTibbert looks like its getting stuck and timing out