swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
708 stars 47 forks source link

Handle swift-testing events > 8kb #800

Closed plemarquand closed 1 month ago

plemarquand commented 1 month ago

Using Node's built in net.Socket imposes an 8kb message limit on the JSONL writes from swift-testing. This meant that if a test case had a lot of iterations the test event would overrun the limit and the message would never be read.

Create our own readable stream and manage pausing/resuming the pipe on data/drain events. This allows for swift-testing to write whatever size messages it wants.