test(lsp): inconsistent `go_to_definition_for_paths` test
https://github.com/FuelLabs/sway/actions/runs/4310274360/jobs/7518550643
This test failed on the first run, but passed on triggering a re-run.
These two unrelated PRs also had the same issue: https://github.com/FuelLabs/sway/actions/runs/4296935289/jobs/7489282684 https://github.com/FuelLabs/sway/actions/runs/4315841590/jobs/7530795852
Happened again with additional logging: https://github.com/FuelLabs/sway/actions/runs/4347930396/jobs/7595847115
---- go_to_definition_for_paths stdout ----
thread 'go_to_definition_for_paths' panicked at 'Failed to deserialize response: Null input: Request {
jsonrpc: Version,
method: "textDocument/definition",
params: Some(
Object {
"position": Object {
"character": Number(39),
"line": Number(6),
},
"textDocument": Object {
"uri": String("file:///home/runner/work/sway/sway/sway-lsp/tests/fixtures/tokens/paths/src/main.sw"),
},
},
),
id: Some(
Number(
61,
),
),
} error: data did not match any variant of untagged enum GotoDefinitionResponse', sway-lsp/tests/integration/lsp.rs:342:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Looks like it's not finding goto definitions for dfun on this line: use deep_mod::deeper_mod::deep_fun as dfun;
We could try switching to cargo-nextest to get retries on flaky tests like this one. It should also speed up CI times in the sway repo overall.