rescript-compiler
rescript-compiler copied to clipboard
rescript format -all fails with a socket error
$ rescript format -all
events.js:292
throw er; // Unhandled 'error' event
^
Error: read ENOTCONN
at tryReadStart (net.js:574:20)
at Socket._read (net.js:585:5)
at Socket.Readable.read (_stream_readable.js:481:10)
at Socket.read (net.js:625:39)
at new Socket (net.js:377:12)
at Object.Socket (net.js:269:41)
at createSocket (internal/child_process.js:314:14)
at ChildProcess.spawn (internal/child_process.js:433:23)
at spawn (child_process.js:553:9)
at Object.execFile (child_process.js:237:17)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -57,
code: 'ENOTCONN',
syscall: 'read'
}
How many files are there in your project? It might be my naive implementation of rescript format which can not handle so many files concurrently. Basically it do an async shell call per file. contributions to the fix is welcome
I've got ~2.6K files (res & resi).
I'd be glad to contribute, I'm going to try formatting by chunks of n files sequentially and see on my project where the limit would fit nicely.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.