Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,11 @@ os.list(tempDir) ==> Seq(tempDir / "file")

=== Zip & Unzip Files

[NOTE]
====
JVM only: Zip-related APIs are available on the JVM but not on Scala Native. The following symbols are JVM-only and are not defined on Native builds: `os.zip`, `os.unzip`, `os.zip.stream`, `os.unzip.stream`, `os.unzip.list`, and `os.zip.open`.
====

==== `os.zip`

[source,scala]
Expand Down Expand Up @@ -2579,6 +2584,10 @@ string, int or set representations of the `os.PermSet` via:

== Changelog

=== 0.11.6

* Re-enabled Scala Native builds (tested with Scala Native 0.5.8). Zip APIs remain JVM-only.

=== 0.11.5

* Dropped support for Scala-Native, until https://github.com/com-lihaoyi/os-lib/issues/395[Fix and re-enable Scala-Native build (500USD Bounty)]
Expand Down
7 changes: 4 additions & 3 deletions build.mill
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,15 @@ object os extends Module {
}
}

/*object native extends Cross[OsNativeModule](scalaVersions)
object native extends Cross[OsNativeModule](scalaVersions)
trait OsNativeModule extends OsModule with ScalaNativeModule {
def scalaNativeVersion = "0.5.2"
def scalaNativeVersion = "0.5.8"
object test extends ScalaNativeTests with OsLibTestModule {
// Keep stubs linked to tolerate optional symbols across platforms
def nativeLinkStubs = true
}
object nohometest extends ScalaNativeTests with OsLibTestModule
}*/
}

object watch extends Module {
object jvm extends Cross[WatchJvmModule](scalaVersions)
Expand Down
52 changes: 52 additions & 0 deletions debug-subprocess-loop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

# Script to help debug intermittent subprocess failures locally
# Usage: ./debug-subprocess-loop.sh [iterations] [target]

ITERATIONS=${1:-50}
TARGET=${2:-"test.os.SubprocessTests"}
SCALA_VERSION="2.13.16"

echo "Running $TARGET in loop for $ITERATIONS iterations..."
echo "Set SUBPROCESS_STRESS_ITERATIONS env var to control stress test iterations"

SUCCESS_COUNT=0
FAILURE_COUNT=0

for i in $(seq 1 $ITERATIONS); do
echo "=== Iteration $i/$ITERATIONS ==="

if ./mill -i "os.jvm[$SCALA_VERSION].test.testOnly" "$TARGET" 2>&1; then
SUCCESS_COUNT=$((SUCCESS_COUNT + 1))
echo "✓ Iteration $i: SUCCESS"
else
FAILURE_COUNT=$((FAILURE_COUNT + 1))
echo "✗ Iteration $i: FAILED"

# Optionally stop on first failure
if [ "$3" = "--stop-on-failure" ]; then
echo "Stopping on first failure as requested"
break
fi
fi

# Small delay between runs
sleep 0.1
done

echo ""
echo "=== SUMMARY ==="
echo "Total iterations: $ITERATIONS"
echo "Successes: $SUCCESS_COUNT"
echo "Failures: $FAILURE_COUNT"
echo "Success rate: $(( SUCCESS_COUNT * 100 / (SUCCESS_COUNT + FAILURE_COUNT) ))%"

if [ $FAILURE_COUNT -gt 0 ]; then
echo ""
echo "Failures detected! This may help reproduce the CI issue."
exit 1
else
echo ""
echo "All tests passed. Try increasing iterations or running under stress."
exit 0
fi
Loading
Loading