Commit 31fdda9
fix: "Couldn't find positions in path" (#48)
* fix: "Couldn't find positions in path"
Quite often I get errors like this one:
ERROR | 2025-10-18T18:40:14Z+0100 | ...te/pack/bundle/start/neotest/lua/neotest/client/init.lua:309 | Couldn't find positions in path <redacted> ...tart/neotest-vstest/lua/neotest-vstest/vstest/client.lua:44: Expected value but found unexpected end of string at character 292
stack traceback:
[C]: in function 'decode'
...tart/neotest-vstest/lua/neotest-vstest/vstest/client.lua:44: in function 'discover_tests_in_project'
.../start/neotest-vstest/lua/neotest-vstest/vstest/init.lua:34: in function 'discover_tests'
...undle/start/neotest-vstest/lua/neotest-vstest/client.lua:39: in function 'discover_tests'
.../bundle/start/neotest-vstest/lua/neotest-vstest/init.lua:299: in function 'discover_positions'
...te/pack/bundle/start/neotest/lua/neotest/client/init.lua:300: in function <...te/pack/bundle/start/neotest/lua/neotest/client/init.lua:264>
[C]: in function 'xpcall'
...te/pack/bundle/start/neotest/lua/neotest/client/init.lua:264: in function '_update_positions'
...te/pack/bundle/start/neotest/lua/neotest/client/init.lua:317: in function <...te/pack/bundle/start/neotest/lua/neotest/client/init.lua:315>
I think that's because the test discovery doesn't flush the `outputFile`
before signalling back by writing "1" to the `waitFile`. Using `using`
to dispose of the `outputFile` `StreamWriter` seems to fix this — I
don't get those errors any more.
* replace using with do-use
---------
Co-authored-by: nsidorenco <[email protected]>1 parent 3ce4c18 commit 31fdda9
1 file changed
+26
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
| |||
120 | 118 | | |
121 | 119 | | |
122 | 120 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
307 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
308 | 314 | | |
309 | 315 | | |
310 | 316 | | |
| |||
320 | 326 | | |
321 | 327 | | |
322 | 328 | | |
323 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
324 | 335 | | |
325 | 336 | | |
326 | 337 | | |
| |||
0 commit comments