Stdio replayer should preserve stdout/stderr sequence
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 128
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 4
Description
Context: https://github.com/lit/wireit/pull/68#discussion_r841973741
I think the ideal solution requires actually encoding the cross-stream sequence in some way. We could do it with a unified format that can encode the stream, or another idea I had was to have a 3rd file which encodes the sequences as offset/length pairs:
```
out 0 20
err 0 10
out 20 100
```
So the replayer would follow these sequences and do something like call `fs.read(stdoutFileDescriptor, {offset:0, length: 20})`. I think that should have better performance over parsing a big unified format. In the case where there is no mixed streams, we can just stream the file straight through as we do now. Also it's kind of nice right now that you get a file like `.wireit//stdout` that the user can do stuff with directly if they want.
Contributor guide
Assessment
This issue has not been assessed yet.