sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.96k stars 360 forks source link

Fix flaky shutdown #2312

Closed ntkme closed 2 months ago

ntkme commented 2 months ago

This PR fixes a few shutdown reliability issues including the following flaky test on GitHub Actions windows runner:

❌ test\embedded\importer_test.dart: emits a protocol error for a response without a corresponding request ID (failed)

  Process `dart_sass_embedded` was killed with SIGKILL in a tear-down. Output:
      canonicalizeRequest: {
        id: 0
        importerId: 1
        url: other
        fromImport: true
      }

  [e] Host caused params error: Response ID 1 doesn't match any outstanding requests in compilation 4321.
      error: {
        type: PARAMS
        id: 4294967295
        message: Response ID 1 doesn't match any outstanding requests in compilation 4321.
      }
  TimeoutException after 0:00:30.000000: Test timed out after 30 seconds. See https://pub.dev/packages/test#timeouts
  dart:isolate  _RawReceivePort._handleMessage
nex3 commented 2 months ago

Thanks for working on this and helping reduce flakiness!