Commit f226e90
Ensure binmode and sync on LSP reporter socket (#3820)
### Motivation
I believe this will close #3760
Since we're using JSON RPC to communicate test results between server and extension, we have to turn on
- binmode: so that Windows preserves the `\r\n\r\n` sequences that are the key request separators
- sync: so that the content of the pipe is not buffered, but immediately flushed
We already do this one very stdio we use and we forgot to do the same for the socket used for tests.
### Implementation
Added `binmode` and `sync` to our LSP reporter socket.
### Automated Tests
I believe that turning `binmode` on our fake test client would've been enough to catch this.1 parent 1104fdd commit f226e90
File tree
3 files changed
+14
-2
lines changed- lib/ruby_lsp/test_reporters
- test/test_reporters
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
212 | 220 | | |
213 | 221 | | |
214 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
184 | 186 | | |
185 | 187 | | |
186 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
0 commit comments