sass --embedded doesn't reliably exit when closing stdin on Windows
This is the same as #2278
This looks like a regression as the tests
- Pass in 1.63.2
- Fails in >= 1.77.5 (last tested 1.80.5)
This works fine on other platforms tested: MacOS and Linux.
I see no error output (stderr, log events) while testing this.
https://github.com/bep/godartsass/pull/29
I wasn't able to reproduce this using the ruby host implementing the exactly same logic as your failing test running on GitHub Actions, and I don't have access to a local windows dev environment.
@bep Is it possible for you to build dart-sass with the following patch and see if it makes any difference:
diff --git a/lib/src/embedded/isolate_dispatcher.dart b/lib/src/embedded/isolate_dispatcher.dart
index fe79f034..085035fe 100644
--- a/lib/src/embedded/isolate_dispatcher.dart
+++ b/lib/src/embedded/isolate_dispatcher.dart
@@ -97,7 +97,7 @@ class IsolateDispatcher {
_handleError(error, stackTrace);
}, onDone: () {
_closed = true;
- _allIsolates.stream.listen((isolate) => isolate.kill());
+ exit(exitCode);
});
}
@bep Is it possible for you to build dart-sass with the following patch and see if it makes any difference:
Reading the building from source I see nothing about cross-compiling to Windows, so I would say no. If you could point me to a Windows executable, I can find a way to test it.
@bep Can you please try the build artifact from here: https://github.com/ntkme/dart-sass-test/actions/runs/11634405067/artifacts/2134365866
Dart doesn't support cross-compilation, but you can build from source on Windows itself.