Closed lihaoyi closed 4 months ago
Scala Native 0.5.1 is out, it should fix this issue
Thanks @WojciechMazur !
I'm now hitting another issue trying to run ./mill -i "os.native[2.13.10].test" test.os.ListingWalkingTests.list.0
on this PR. Seems like Files.walkFileTree
behaves differently between JVM and Native, and on Native it fails to enumerate all the files (e.g. out/scratch/ListingWalkingTests/tests/list/0/Multi Line.txt
below) in the directory tree?
Native
visitFile out/scratch/ListingWalkingTests/tests/list/0/misc/file-symlink
visitFile out/scratch/ListingWalkingTests/tests/list/0/misc/broken-abs-symlink
visitFile out/scratch/ListingWalkingTests/tests/list/0/misc/broken-symlink
postVisitDirectory out/scratch/ListingWalkingTests/tests/list/0/misc
postVisitDirectory out/scratch/ListingWalkingTests/tests/list/0
X test.os.ListingWalkingTests.list.0 3ms
java.nio.file.DirectoryNotEmptyException: out/scratch/ListingWalkingTests/tests/list/0
java.nio.file.PosixException$.apply(Unknown)
java.nio.file.Files$.$anonfun$unixDeletePath$1(Unknown)
java.nio.file.Files$$$Lambda$3.apply(Unknown)
scala.scalanative.unsafe.Zone$.acquire(Unknown)
java.nio.file.Files$.unixDeletePath(Unknown)
java.nio.file.Files$.delete(Unknown)
java.nio.file.Files.delete(Unknown)
test.os.TestUtil$$anon$1.postVisitDirectory(Unknown)
test.os.TestUtil$$anon$1.postVisitDirectory(Unknown)
java.nio.file.Files$._walkFileTree(Unknown)
java.nio.file.Files$.walkFileTree(Unknown)
java.nio.file.Files$.walkFileTree(Unknown)
java.nio.file.Files.walkFileTree(Unknown)
test.os.TestUtil$.prep(Unknown)
test.os.ListingWalkingTests$.$anonfun$tests$3(Unknown)
Jvm
[188/188] os.jvm[2.13.10].test.test
--------------- Running Tests test.os.ListingWalkingTests.list.0 ---------------
visitFile out/scratch/ListingWalkingTests/tests/list/0/misc/file-symlink
visitFile out/scratch/ListingWalkingTests/tests/list/0/misc/broken-abs-symlink
visitFile out/scratch/ListingWalkingTests/tests/list/0/misc/broken-symlink
postVisitDirectory out/scratch/ListingWalkingTests/tests/list/0/misc
visitFile out/scratch/ListingWalkingTests/tests/list/0/Multi Line.txt
postVisitDirectory out/scratch/ListingWalkingTests/tests/list/0
+ test.os.ListingWalkingTests.list.0 1
Minimal repro https://github.com/scala-native/scala-native/issues/3878
The issue should be fixed by:
It seems to pass using 0.5.2-SNAPSHOT, but there is a few other failures. I'll try to minimize and fix them later this week
Thanks @WojciechMazur !
Update on the SN issues: The latest 0.5.2-SNAPSHOT is good enough to successfully run the tests thanks to:
There is however 1 ongoing issue related to Process Input/Output - the thread dedicated to processing stdout/stderr of process can fail with exception after process is finished due to bad file descriptor. I'm working on a fix to this problem. Anyway, if there is an urgent need we can publish a 0.5.2 this week with prepared fixes.
Thanks @WojciechMazur! I think there's no urgent-urgent need at the moment. Looking forward to your fixes to scala-native so I can update the tests in the os-lib repo
Scala Native 0.5.2
was just released which makes all tests pass 🎉
Thanks @lolgab @WojciechMazur ! I guess this can be used without a new os-lib release, just by bumping the Scala-Native version right?
Thanks @lolgab @WojciechMazur ! I guess this can be used without a new os-lib release, just by bumping the Scala-Native version right?
I guess a release is needed, since you moved some source files from src-jvm
to src
.
@lefou good point, I'll tag one
I tagged OS-Lib 0.10.2, which should be out soon
Currently fails with