(I didn't see an issue for this, so I guess it might be Windows specific?)
Given the following in a file Demo.res where Test is the module Test.res
When doing CTRL + Mouse left click on Test I get:
Unable to open 'Test.res': Unable to read file '\\c:\Projects\rescript-project-template\src\Test.res' (Unknown (FileSystemError): Error: UNKNOWN: unknown error, stat '\\c:\Projects\rescript-project-template\src\Test.res').
I tried debugging in and got that in the definition case
|
} else if (msg.method === p.DefinitionRequest.method) { |
I get the uri being sent
|
uri: result.definition.uri || msg.params.textDocument.uri, |
to be
result.definition.uri = file://c:/Projects/rescript-project-template/src/Test.res
msg.params.textDocument.uri = file:///c%3A/Projects/rescript-project-template/src/Demo.res.
If I add an extra slash to the result.definition.uri so that it becomes file:/// (like the other uri) then it jumps to the definition properly.
I don't know what the best way to resolve this is, though.
(I didn't see an issue for this, so I guess it might be Windows specific?)
Given the following in a file
Demo.reswhereTestis the moduleTest.resWhen doing CTRL + Mouse left click on
TestI get:Unable to open 'Test.res': Unable to read file '\\c:\Projects\rescript-project-template\src\Test.res' (Unknown (FileSystemError): Error: UNKNOWN: unknown error, stat '\\c:\Projects\rescript-project-template\src\Test.res').I tried debugging in and got that in the definition case
rescript-vscode/server/src/server.ts
Line 345 in f773b36
I get the uri being sent
rescript-vscode/server/src/server.ts
Line 360 in f773b36
to be
result.definition.uri=file://c:/Projects/rescript-project-template/src/Test.resmsg.params.textDocument.uri=file:///c%3A/Projects/rescript-project-template/src/Demo.res.If I add an extra slash to the
result.definition.uriso that it becomesfile:///(like the other uri) then it jumps to the definition properly.I don't know what the best way to resolve this is, though.