Skip to content

fix paths on Windows (or at least attempt to)#75

Open
Andriamanitra wants to merge 1 commit into
mainfrom
windows-path-fix
Open

fix paths on Windows (or at least attempt to)#75
Andriamanitra wants to merge 1 commit into
mainfrom
windows-path-fix

Conversation

@Andriamanitra
Copy link
Copy Markdown
Owner

This may or may not fix #74 (need someone using Windows to test)

closes #74

@marodriguezs
Copy link
Copy Markdown

Changes in main.lua -> made (manually)
tested again: micro -debug test.jl -> new log.txt:

2025/12/08 15:23:40 Micro started
2025/12/08 15:24:21 [µlsp] Started 'julia' with args map[1:--startup-file=no 2:--history-file=no 3:-e 4:using LanguageServer; runserver()]
2025/12/08 15:24:21 [µlsp] ( julials )-> Content-Length: 487

{"id":0,"jsonrpc":"2.0","method":"initialize","params":{"processId":5820,"rootUri":"file://C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro","workspaceFolders":[{"name":"root","uri":"file://C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro"}],"capabilities":{"textDocument":{"synchronization":{"didSave":true,"willSave":false},"hover":{"contentFormat":["plaintext"]},"completion":{"completionItem":{"snippetSupport":false,"documentationFormat":[]},"contextSupport":true}}}}} 


2025/12/08 15:24:26 [µlsp] <-( julials [stdout] ) Content-Length: 1298

 


2025/12/08 15:24:26 [µlsp] <-( julials [stdout] ) {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":true}},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","@","\"","^"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"declarationProvider":false,"definitionProvider":true,"typeDefinitionProvider":false,"implementationProvider":false,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentLinkProvider":{"resolveProvider":false},"colorProvider":false,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"renameProvider":{"prepareProvider":false},"foldingRangeProvider":false,"executeCommandProvider":{"commands":["UpdateDocstringSignature","CompareNothingWithTripleEqual","AddDocstringTemplate","FixMissingRef","ReexportModule","ReplaceUnusedAssignmentName","ExpandFunction","RewriteAsRawString","ExplicitPackageVarImport","DeleteUnusedFunctionArgumentName","OrganizeImports","AddLicenseIdentifier","RewriteAsRegularString"]},"selectionRangeProvider":true,"inlayHintProvider":true,"workspaceSymbolProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}}}} 


2025/12/08 15:24:26 [µlsp] ( julials )-> Content-Length: 52

{"jsonrpc":"2.0","method":"initialized","params":{}} 


2025/12/08 15:24:26 [µlsp] ( julials )-> Content-Length: 372

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file://C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro%5Ctest.jl","languageId":"julia","version":1,"text":"function suma(a,b)\r\n\treturn a+b\r\nend\r\nprintln(a+b)\r\nfor a=1:3\r\n\tfor b=3:6\r\n\t\tprintln(suma(a,b))\r\n\tend\r\nend\r\nusing Plots\r\nplot(sin)\r\n\r\n\r\n\r\n"}}} 


2025/12/08 15:24:30 [µlsp] julials exited (exit status 1)
2025/12/08 15:24:30 [µlsp] julials stderr:
ERROR: Relative path `` is not valid.
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:44
  [2] filepath2uri(path::String)
    @ LanguageServer.URIs2 C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\URIs2\uri_helpers.jl:32
  [3] _broadcast_getindex_evalf
    @ .\broadcast.jl:699 [inlined]
  [4] _broadcast_getindex
    @ .\broadcast.jl:672 [inlined]
  [5] _getindex
    @ .\broadcast.jl:620 [inlined]
  [6] getindex
    @ .\broadcast.jl:616 [inlined]
  [7] macro expansion
    @ .\broadcast.jl:995 [inlined]
  [8] macro expansion
    @ .\simdloop.jl:77 [inlined]
  [9] copyto!
    @ .\broadcast.jl:994 [inlined]
 [10] copyto!
    @ .\broadcast.jl:947 [inlined]
 [11] copy
    @ .\broadcast.jl:919 [inlined]
 [12] materialize
    @ .\broadcast.jl:894 [inlined]
 [13] initialized_notification(params::LanguageServer.InitializedParams, server::LanguageServerInstance, conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint})
    @ LanguageServer C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\requests\init.jl:200
 [14] (::LanguageServer.var"#request_wrapper##0#request_wrapper##1"{typeof(LanguageServer.initialized_notification), LanguageServerInstance})(conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::LanguageServer.InitializedParams)
    @ LanguageServer C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\languageserverinstance.jl:273
 [15] dispatch_msg(x::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::JSONRPC.MsgDispatcher, msg::Dict{String, Any})
    @ JSONRPC C:\Users\user0\.julia\packages\JSONRPC\RIWyo\src\typed.jl:67
 [16] run(server::LanguageServerInstance; timings::Vector{Any})
    @ LanguageServer C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\languageserverinstance.jl:405
 [17] run
    @ C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\languageserverinstance.jl:283 [inlined]
 [ Info: Downloading cache files...
[18] runserver(pipe_in::Base.PipeEndpoint, pipe_out::Base.PipeEndpoint, env_path::String, depot_path::String, err_handler::Nothing, symserver_store_path::Nothing)
    @ LanguageServer C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\runserver.jl:41
 [19] runserver()
    @ LanguageServer C:\Users\user0\.julia\packages\LanguageServer\Fwm1f\src\runserver.jl:39
 [20] top-level scope
    @ none:1
 [21] eval(m::Module, e::Any)
    @ Core .\boot.jl:489
 [22] exec_options(opts::Base.JLOptions)
    @ Base .\client.jl:283
 [23] _start()
    @ Base .\client.jl:550

@Andriamanitra
Copy link
Copy Markdown
Owner Author

Are you sure you applied the patch correctly? It should be impossible for it to log "rootUri":"file://C..." with the new code, because fileUriFromAbsPath now always puts three / characters in the file uri (I'd expect to see "file:///C...").

You can try the changes in this PR by running the following commands (assuming you've cloned the repository to ~/.config/micro/plug/mlsp):

cd ~/.config/micro/plug/mlsp
git fetch origin windows-path-fix:windows-path-fix
git restore --source=windows-path-fix -- main.lua

@marodriguezs
Copy link
Copy Markdown

marodriguezs commented Dec 8, 2025

Are you sure you applied the patch correctly? -> Yes (edited main.lua with micro and double checked the changes.)

Now with:
cd ~/.config/micro/plug/mlsp
git fetch origin windows-path-fix:windows-path-fix
git restore --source=windows-path-fix -- main.lua

log.txt seems to be the same except for:

***** log.txt
    @ none:1
 [21] eval(m::Module, e::Any)
***** LOGANT1.TXT
    @ none:1
[ Info: Downloading cache files...
 [21] eval(m::Module, e::Any)
*****

@Andriamanitra
Copy link
Copy Markdown
Owner Author

It must still be using the old version of main.lua somehow – I've checked multiple times and code that could create a file uri with only two slashes doesn't exist any more. Is it possible that you have the plugin in two different places, only one of which is the configuration directory for micro?

Note that the path in the cd command is where I have the configuration directory on my (Linux) machine. Your installation path may be different in which case you should tweak the command to match.

@marodriguezs
Copy link
Copy Markdown

marodriguezs commented Dec 9, 2025

The cause of test problems was that i have the initial main.lua file saved as mainant.lua in the same directory with the modified main.lua. Mlsp accesed mainant.lua always, so log.txt looks the same.

Micro does not give an error after removing main.lua, so I removed also mainant.lua and then there was an error message.

Then only with the modified main.lua mlsp seems to work ok; and also after renaming main.lua as main1.lua

MLSP exits and has to be restarted with F7 after:
> lsp goto-implementation
> lsp goto-typedefinition

log.txt:

2025/12/09 15:08:23 Micro started
2025/12/09 15:08:26 [µlsp] Started 'julia' with args map[1:--startup-file=no 2:--history-file=no 3:-e 4:using LanguageServer; runserver()]
2025/12/09 15:08:26 [µlsp] ( julials )-> Content-Length: 489

{"id":0,"jsonrpc":"2.0","method":"initialize","params":{"processId":2800,"rootUri":"file:///C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro","workspaceFolders":[{"name":"root","uri":"file:///C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro"}],"capabilities":{"textDocument":{"synchronization":{"didSave":true,"willSave":false},"hover":{"contentFormat":["plaintext"]},"completion":{"completionItem":{"snippetSupport":false,"documentationFormat":[]},"contextSupport":true}}}}} 


2025/12/09 15:08:31 [µlsp] <-( julials [stdout] ) Content-Length: 1298

 


2025/12/09 15:08:31 [µlsp] <-( julials [stdout] ) {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":true}},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".","@","\"","^"]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"declarationProvider":false,"definitionProvider":true,"typeDefinitionProvider":false,"implementationProvider":false,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentLinkProvider":{"resolveProvider":false},"colorProvider":false,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"renameProvider":{"prepareProvider":false},"foldingRangeProvider":false,"executeCommandProvider":{"commands":["UpdateDocstringSignature","CompareNothingWithTripleEqual","AddDocstringTemplate","FixMissingRef","ReexportModule","ReplaceUnusedAssignmentName","ExpandFunction","RewriteAsRawString","ExplicitPackageVarImport","DeleteUnusedFunctionArgumentName","OrganizeImports","AddLicenseIdentifier","RewriteAsRegularString"]},"selectionRangeProvider":true,"inlayHintProvider":true,"workspaceSymbolProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}}}} 


2025/12/09 15:08:31 [µlsp] ( julials )-> Content-Length: 52

{"jsonrpc":"2.0","method":"initialized","params":{}} 


2025/12/09 15:08:31 [µlsp] ( julials )-> Content-Length: 373

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro%5Ctest.jl","languageId":"julia","version":1,"text":"function suma(a,b)\r\n\treturn a+b\r\nend\r\nprintln(a+b)\r\nfor a=1:3\r\n\tfor b=3:6\r\n\t\tprintln(suma(a,b))\r\n\tend\r\nend\r\nusing Plots\r\nplot(sin)\r\n\r\n\r\n\r\n"}}} 


2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) Content-Length: 839

 


2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/Leame.jl","version":0,"diagnostics":[{"range":{"start":{"line":23,"character":6},"end":{"line":23,"character":7}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":34,"character":6},"end":{"line":34,"character":7}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":40,"character":0},"end":{"line":40,"character":5}},"severity":2,"source":"Julia","message":"Missing reference: julia"},{"range":{"start":{"line":40,"character":7},"end":{"line":53,"character":3}},"severity":1,"source":"Julia","message":"Parsing error"}]},"jsonrpc":"2.0"} 


2025/12/09 15:08:35 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/Leame.jl
2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) Content-Length: 3395

 


2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/Xxxsubs.jl","version":0,"diagnostics":[{"range":{"start":{"line":22,"character":8},"end":{"line":22,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: Dates"},{"range":{"start":{"line":25,"character":14},"end":{"line":25,"character":21}},"severity":2,"source":"Julia","message":"Missing reference: outfile"},{"range":{"start":{"line":25,"character":22},"end":{"line":25,"character":28}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":28,"character":4},"end":{"line":28,"character":12}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":30,"character":25},"end":{"line":30,"character":32}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":9},"end":{"line":52,"character":17}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":18},"end":{"line":52,"character":26}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":27},"end":{"line":52,"character":35}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":36},"end":{"line":52,"character":45}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":46},"end":{"line":52,"character":54}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":55},"end":{"line":52,"character":64}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":65},"end":{"line":52,"character":74}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":69,"character":37},"end":{"line":69,"character":39}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":104,"character":44},"end":{"line":104,"character":45}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":104,"character":54},"end":{"line":104,"character":55}},"severity":2,"source":"Julia","message":"Missing reference: f"},{"range":{"start":{"line":163,"character":14},"end":{"line":163,"character":19}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":163,"character":20},"end":{"line":163,"character":24}},"severity":2,"source":"Julia","message":"Missing reference: Date"},{"range":{"start":{"line":197,"character":11},"end":{"line":197,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: outfile"},{"range":{"start":{"line":197,"character":20},"end":{"line":197,"character":26}},"severity":2,"source":"Julia","message":"Missing reference: fileio"}]},"jsonrpc":"2.0"} 


2025/12/09 15:08:35 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/Xxxsubs.jl
2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) Content-Length: 179

{"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/adivinanumero.jl","version":0,"diagnostics":[]},"jsonrpc":"2.0"}Content-Length: 11205

{"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/ehz1p.jl","version":0,"diagnostics":[{"range":{"start":{"line":26,"character":8},"end":{"line":26,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: Printf"},{"range":{"start":{"line":32,"character":11},"end":{"line":32,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: l40"},{"range":{"start":{"line":32,"character":15},"end":{"line":32,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: l61"},{"range":{"start":{"line":35,"character":10},"end":{"line":35,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: Revise"},{"range":{"start":{"line":36,"character":10},"end":{"line":36,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: Printf"},{"range":{"start":{"line":37,"character":10},"end":{"line":37,"character":17}},"severity":2,"source":"Julia","message":"Missing reference: Xxxsubs"},{"range":{"start":{"line":42,"character":14},"end":{"line":42,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":43,"character":14},"end":{"line":43,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":44,"character":14},"end":{"line":44,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":45,"character":14},"end":{"line":45,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":46,"character":14},"end":{"line":46,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":60,"character":18},"end":{"line":60,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: s0"},{"range":{"start":{"line":63,"character":7},"end":{"line":63,"character":9}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":64,"character":14},"end":{"line":64,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":66,"character":14},"end":{"line":66,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":67,"character":14},"end":{"line":67,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":85,"character":16},"end":{"line":85,"character":23}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":85,"character":24},"end":{"line":85,"character":30}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":86,"character":12},"end":{"line":86,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":86,"character":20},"end":{"line":86,"character":26}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":87,"character":8},"end":{"line":87,"character":15}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":87,"character":16},"end":{"line":87,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":115,"character":20},"end":{"line":115,"character":21}},"severity":2,"source":"Julia","message":"Missing reference: r"},{"range":{"start":{"line":123,"character":9},"end":{"line":123,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":124,"character":8},"end":{"line":124,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":129,"character":14},"end":{"line":129,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":131,"character":14},"end":{"line":131,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":132,"character":6},"end":{"line":132,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":133,"character":6},"end":{"line":133,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":133,"character":14},"end":{"line":133,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":141,"character":13},"end":{"line":141,"character":15}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":142,"character":13},"end":{"line":142,"character":15}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":151,"character":28},"end":{"line":151,"character":29}},"severity":2,"source":"Julia","message":"Missing reference: d"},{"range":{"start":{"line":152,"character":23},"end":{"line":152,"character":24}},"severity":2,"source":"Julia","message":"Missing reference: d"},{"range":{"start":{"line":159,"character":8},"end":{"line":159,"character":15}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":160,"character":8},"end":{"line":160,"character":15}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":163,"character":8},"end":{"line":163,"character":15}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":163,"character":16},"end":{"line":163,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":164,"character":8},"end":{"line":164,"character":15}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":164,"character":16},"end":{"line":164,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":165,"character":16},"end":{"line":165,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":167,"character":6},"end":{"line":167,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":167,"character":51},"end":{"line":167,"character":53}},"severity":2,"source":"Julia","message":"Missing reference: k1"},{"range":{"start":{"line":167,"character":63},"end":{"line":167,"character":65}},"severity":2,"source":"Julia","message":"Missing reference: d1"},{"range":{"start":{"line":168,"character":6},"end":{"line":168,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":171,"character":6},"end":{"line":171,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":171,"character":14},"end":{"line":171,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":171,"character":58},"end":{"line":171,"character":60}},"severity":2,"source":"Julia","message":"Missing reference: k1"},{"range":{"start":{"line":171,"character":70},"end":{"line":171,"character":72}},"severity":2,"source":"Julia","message":"Missing reference: d1"},{"range":{"start":{"line":172,"character":6},"end":{"line":172,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: @printf"},{"range":{"start":{"line":172,"character":14},"end":{"line":172,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":173,"character":14},"end":{"line":173,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":210,"character":4},"end":{"line":210,"character":7}},"severity":2,"source":"Julia","message":"Missing reference: cls"},{"range":{"start":{"line":210,"character":11},"end":{"line":210,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":211,"character":4},"end":{"line":211,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":212,"character":4},"end":{"line":212,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":213,"character":9},"end":{"line":213,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":214,"character":9},"end":{"line":214,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":215,"character":7},"end":{"line":215,"character":12}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":216,"character":4},"end":{"line":216,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: mkoutfile"},{"range":{"start":{"line":217,"character":4},"end":{"line":217,"character":8}},"severity":2,"source":"Julia","message":"Missing reference: cldn"},{"range":{"start":{"line":226,"character":4},"end":{"line":226,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":226,"character":13},"end":{"line":226,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: cll"},{"range":{"start":{"line":229,"character":15},"end":{"line":229,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":232,"character":5},"end":{"line":232,"character":9}},"severity":2,"source":"Julia","message":"Missing reference: cldn"},{"range":{"start":{"line":233,"character":8},"end":{"line":233,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":237,"character":4},"end":{"line":237,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":237,"character":13},"end":{"line":237,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: cll"},{"range":{"start":{"line":240,"character":15},"end":{"line":240,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":243,"character":4},"end":{"line":243,"character":8}},"severity":2,"source":"Julia","message":"Missing reference: cldn"},{"range":{"start":{"line":243,"character":16},"end":{"line":243,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":243,"character":27},"end":{"line":243,"character":29}},"severity":2,"source":"Julia","message":"Missing reference: iv"},{"range":{"start":{"line":245,"character":12},"end":{"line":245,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":246,"character":10},"end":{"line":246,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: fileio"}]},"jsonrpc":"2.0"} 


2025/12/09 15:08:35 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/adivinanumero.jl
2025/12/09 15:08:35 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/ehz1p.jl
2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) Content-Length: 1690

 


2025/12/09 15:08:35 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/test-tema.jl","version":0,"diagnostics":[{"range":{"start":{"line":3,"character":6},"end":{"line":3,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: OhMyREPL"},{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: test_colorscheme"},{"range":{"start":{"line":6,"character":17},"end":{"line":6,"character":27}},"severity":4,"code":"UnusedFunctionArgument","source":"Julia","message":"An argument is included in a function signature but not used within its body.","tags":[1]},{"range":{"start":{"line":6,"character":29},"end":{"line":6,"character":37}},"severity":4,"code":"UnusedFunctionArgument","source":"Julia","message":"An argument is included in a function signature but not used within its body.","tags":[1]},{"range":{"start":{"line":9,"character":4},"end":{"line":9,"character":5}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":10,"character":4},"end":{"line":10,"character":5}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":13,"character":4},"end":{"line":13,"character":5}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":13,"character":8},"end":{"line":13,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: funccall"}]},"jsonrpc":"2.0"}Content-Length: 737

{"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/test.jl","version":0,"diagnostics":[{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":9}},"severity":2,"source":"Julia","message":"Missing reference: a"},{"range":{"start":{"line":3,"character":10},"end":{"line":3,"character":11}},"severity":2,"source":"Julia","message":"Missing reference: b"},{"range":{"start":{"line":9,"character":6},"end":{"line":9,"character":11}},"severity":2,"source":"Julia","message":"Missing reference: Plots"},{"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":4}},"severity":2,"source":"Julia","message":"Missing reference: plot"}]},"jsonrpc":"2.0"}Content-Length: 182

{"method":"textDocument/publishDiagnostics","params":{"uri":"file:///C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro%5Ctest.jl","version":1,"diagnostics":[]},"jsonrpc":"2.0"} 


2025/12/09 15:08:35 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/test-tema.jl
2025/12/09 15:08:35 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/test.jl
2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 839

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/Leame.jl","version":0,"diagnostics":[{"range":{"start":{"line":23,"character":6},"end":{"line":23,"character":7}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":34,"character":6},"end":{"line":34,"character":7}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":40,"character":0},"end":{"line":40,"character":5}},"severity":2,"source":"Julia","message":"Missing reference: julia"},{"range":{"start":{"line":40,"character":7},"end":{"line":53,"character":3}},"severity":1,"source":"Julia","message":"Parsing error"}]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/Leame.jl
2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 1690

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/test-tema.jl","version":0,"diagnostics":[{"range":{"start":{"line":3,"character":6},"end":{"line":3,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: OhMyREPL"},{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: test_colorscheme"},{"range":{"start":{"line":6,"character":17},"end":{"line":6,"character":27}},"severity":4,"code":"UnusedFunctionArgument","source":"Julia","message":"An argument is included in a function signature but not used within its body.","tags":[1]},{"range":{"start":{"line":6,"character":29},"end":{"line":6,"character":37}},"severity":4,"code":"UnusedFunctionArgument","source":"Julia","message":"An argument is included in a function signature but not used within its body.","tags":[1]},{"range":{"start":{"line":9,"character":4},"end":{"line":9,"character":5}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":10,"character":4},"end":{"line":10,"character":5}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":13,"character":4},"end":{"line":13,"character":5}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":13,"character":8},"end":{"line":13,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: funccall"}]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/test-tema.jl
2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 3101

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/Xxxsubs.jl","version":0,"diagnostics":[{"range":{"start":{"line":25,"character":14},"end":{"line":25,"character":21}},"severity":2,"source":"Julia","message":"Missing reference: outfile"},{"range":{"start":{"line":25,"character":22},"end":{"line":25,"character":28}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":28,"character":4},"end":{"line":28,"character":12}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":30,"character":25},"end":{"line":30,"character":32}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":9},"end":{"line":52,"character":17}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":18},"end":{"line":52,"character":26}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":27},"end":{"line":52,"character":35}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":36},"end":{"line":52,"character":45}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":46},"end":{"line":52,"character":54}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":55},"end":{"line":52,"character":64}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":52,"character":65},"end":{"line":52,"character":74}},"severity":3,"code":"IncorrectCallArgs","source":"Julia","message":"Possible method call error."},{"range":{"start":{"line":69,"character":37},"end":{"line":69,"character":39}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":104,"character":44},"end":{"line":104,"character":45}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":104,"character":54},"end":{"line":104,"character":55}},"severity":2,"source":"Julia","message":"Missing reference: f"},{"range":{"start":{"line":163,"character":14},"end":{"line":163,"character":19}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":197,"character":11},"end":{"line":197,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: outfile"},{"range":{"start":{"line":197,"character":20},"end":{"line":197,"character":26}},"severity":2,"source":"Julia","message":"Missing reference: fileio"}]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/Xxxsubs.jl
2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 8816

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/ehz1p.jl","version":0,"diagnostics":[{"range":{"start":{"line":32,"character":11},"end":{"line":32,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: l40"},{"range":{"start":{"line":32,"character":15},"end":{"line":32,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: l61"},{"range":{"start":{"line":37,"character":10},"end":{"line":37,"character":17}},"severity":2,"source":"Julia","message":"Missing reference: Xxxsubs"},{"range":{"start":{"line":42,"character":14},"end":{"line":42,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":43,"character":14},"end":{"line":43,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":44,"character":14},"end":{"line":44,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":45,"character":14},"end":{"line":45,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":46,"character":14},"end":{"line":46,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":60,"character":18},"end":{"line":60,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: s0"},{"range":{"start":{"line":63,"character":7},"end":{"line":63,"character":9}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":64,"character":14},"end":{"line":64,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":66,"character":14},"end":{"line":66,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":67,"character":14},"end":{"line":67,"character":19}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":85,"character":24},"end":{"line":85,"character":30}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":86,"character":20},"end":{"line":86,"character":26}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":87,"character":16},"end":{"line":87,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":115,"character":20},"end":{"line":115,"character":21}},"severity":2,"source":"Julia","message":"Missing reference: r"},{"range":{"start":{"line":123,"character":9},"end":{"line":123,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":124,"character":8},"end":{"line":124,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":129,"character":14},"end":{"line":129,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":131,"character":14},"end":{"line":131,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":133,"character":14},"end":{"line":133,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":141,"character":13},"end":{"line":141,"character":15}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":142,"character":13},"end":{"line":142,"character":15}},"severity":4,"code":"UnusedBinding","source":"Julia","message":"Variable has been assigned but not used.","tags":[1]},{"range":{"start":{"line":151,"character":28},"end":{"line":151,"character":29}},"severity":2,"source":"Julia","message":"Missing reference: d"},{"range":{"start":{"line":152,"character":23},"end":{"line":152,"character":24}},"severity":2,"source":"Julia","message":"Missing reference: d"},{"range":{"start":{"line":163,"character":16},"end":{"line":163,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":164,"character":16},"end":{"line":164,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":165,"character":16},"end":{"line":165,"character":22}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":167,"character":51},"end":{"line":167,"character":53}},"severity":2,"source":"Julia","message":"Missing reference: k1"},{"range":{"start":{"line":167,"character":63},"end":{"line":167,"character":65}},"severity":2,"source":"Julia","message":"Missing reference: d1"},{"range":{"start":{"line":171,"character":14},"end":{"line":171,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":171,"character":58},"end":{"line":171,"character":60}},"severity":2,"source":"Julia","message":"Missing reference: k1"},{"range":{"start":{"line":171,"character":70},"end":{"line":171,"character":72}},"severity":2,"source":"Julia","message":"Missing reference: d1"},{"range":{"start":{"line":172,"character":14},"end":{"line":172,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":173,"character":14},"end":{"line":173,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":210,"character":4},"end":{"line":210,"character":7}},"severity":2,"source":"Julia","message":"Missing reference: cls"},{"range":{"start":{"line":210,"character":11},"end":{"line":210,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":211,"character":4},"end":{"line":211,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":212,"character":4},"end":{"line":212,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":213,"character":9},"end":{"line":213,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":214,"character":9},"end":{"line":214,"character":14}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":215,"character":7},"end":{"line":215,"character":12}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":216,"character":4},"end":{"line":216,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: mkoutfile"},{"range":{"start":{"line":217,"character":4},"end":{"line":217,"character":8}},"severity":2,"source":"Julia","message":"Missing reference: cldn"},{"range":{"start":{"line":226,"character":4},"end":{"line":226,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":226,"character":13},"end":{"line":226,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: cll"},{"range":{"start":{"line":229,"character":15},"end":{"line":229,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":232,"character":5},"end":{"line":232,"character":9}},"severity":2,"source":"Julia","message":"Missing reference: cldn"},{"range":{"start":{"line":233,"character":8},"end":{"line":233,"character":13}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":237,"character":4},"end":{"line":237,"character":6}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":237,"character":13},"end":{"line":237,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: cll"},{"range":{"start":{"line":240,"character":15},"end":{"line":240,"character":20}},"severity":2,"source":"Julia","message":"Missing reference: incam"},{"range":{"start":{"line":243,"character":4},"end":{"line":243,"character":8}},"severity":2,"source":"Julia","message":"Missing reference: cldn"},{"range":{"start":{"line":243,"character":16},"end":{"line":243,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: cr"},{"range":{"start":{"line":243,"character":27},"end":{"line":243,"character":29}},"severity":2,"source":"Julia","message":"Missing reference: iv"},{"range":{"start":{"line":245,"character":12},"end":{"line":245,"character":18}},"severity":2,"source":"Julia","message":"Missing reference: fileio"},{"range":{"start":{"line":246,"character":10},"end":{"line":246,"character":16}},"severity":2,"source":"Julia","message":"Missing reference: fileio"}]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/ehz1p.jl
2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 737

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/test.jl","version":0,"diagnostics":[{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":9}},"severity":2,"source":"Julia","message":"Missing reference: a"},{"range":{"start":{"line":3,"character":10},"end":{"line":3,"character":11}},"severity":2,"source":"Julia","message":"Missing reference: b"},{"range":{"start":{"line":9,"character":6},"end":{"line":9,"character":11}},"severity":2,"source":"Julia","message":"Missing reference: Plots"},{"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":4}},"severity":2,"source":"Julia","message":"Missing reference: plot"}]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/test.jl
2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 182

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///C%3A%5CUsers%5Cuser0%5CJulia%5CJuliaProgs%5CPruebaMicro%5Ctest.jl","version":1,"diagnostics":[]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) Content-Length: 179

 


2025/12/09 15:09:06 [µlsp] <-( julials [stdout] ) {"method":"textDocument/publishDiagnostics","params":{"uri":"file:///c%3A/Users/user0/Julia/JuliaProgs/PruebaMicro/adivinanumero.jl","version":0,"diagnostics":[]},"jsonrpc":"2.0"} 


2025/12/09 15:09:06 [µlsp] DEBUG: received diagnostics for document that is not open: c:/Users/user0/Julia/JuliaProgs/PruebaMicro/adivinanumero.jl

@Andriamanitra
Copy link
Copy Markdown
Owner Author

The cause of test problems was that i have the initial main.lua file saved as mainant.lua in the same directory with the modified main.lua. Mlsp accesed mainant.lua always, so log.txt looks the same.

Micro does not give an error after removing main.lua, so I removed also mainant.lua and then there was an error message.

That makes sense, micro doesn't care about the filenames, it just executes all .lua files in the plugin directory (in alphabetical order if I recall correctly).

I think the new error is because in Windows paths are case-insensitive (sigh..), so we should treat handle c:/ and C:/ as the same path.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#uri

@bjornasm
Copy link
Copy Markdown

bjornasm commented Mar 17, 2026

I checked out this pr and tried to run ruff but still got exit status 2.
I'll try to dig into the code a bit more.

Traceback (most recent call last):
  File "C:\Users\myusername\AppData\Local\Programs\Python\Python312\Lib\site-packages\pylsp_jsonrpc\streams.py", line 40, in listen
    message_consumer(json.loads(request_str.decode('utf-8')))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ujson.JSONDecodeError: Unrecognized escape sequence when decoding 'string'

2026/03/17 11:35:04 [µlsp] Started 'ruff' with args map[1:server]
2026/03/17 11:35:04 [µlsp] ( ruff )-> Content-Length: 426

{"id":0,"jsonrpc":"2.0","method":"initialize","params":{"processId":25404,"rootUri":"file:///C%3A%5CUsers%5Cmyusername","workspaceFolders":[{"name":"root","uri":"file:///C%3A%5CUsers%5Cmyusername"}],"capabilities":{"textDocument":{"synchronization":{"didSave":true,"willSave":false},"hover":{"contentFormat":["plaintext"]},"completion":{"completionItem":{"snippetSupport":false,"documentationFormat":[]},"contextSupport":true}}}}} 


2026/03/17 11:35:04 [µlsp] <-( ruff [stdout] ) Content-Length: 993

 


2026/03/17 11:35:04 [µlsp] <-( ruff [stdout] ) {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix","source.fixAll.ruff","source.organizeImports.ruff","notebook.source.fixAll.ruff","notebook.source.organizeImports.ruff"],"resolveProvider":true,"workDoneProgress":true},"diagnosticProvider":{"identifier":"Ruff","interFileDependencies":false,"workDoneProgress":true,"workspaceDiagnostics":false},"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"executeCommandProvider":{"commands":["ruff.applyFormat","ruff.applyAutofix","ruff.applyOrganizeImports","ruff.printDebugInformation"],"workDoneProgress":false},"hoverProvider":true,"notebookDocumentSync":{"notebookSelector":[{"cells":[{"language":"python"}]}],"save":false},"positionEncoding":"utf-16","textDocumentSync":{"change":2,"openClose":true,"willSave":false,"willSaveWaitUntil":false},"workspace":{"workspaceFolders":{"changeNotifications":true,"supported":true}}},"serverInfo":{"name":"ruff","version":"0.6.1"}}} 


2026/03/17 11:35:04 [µlsp] ( ruff )-> Content-Length: 52

{"jsonrpc":"2.0","method":"initialized","params":{}} 


2026/03/17 11:35:04 [µlsp] ( ruff )-> Content-Length: 615

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C%3A%5CUsers%5Cmyusername%5Ctest.py","languageId":"python","version":1,"text":"import math\r\nimport sys,os\r\nimport json\r\nimport datetime\r\n\r\ndef add ( a , b ):\r\n    return  a+b\r\n\r\n\r\ndef unused_function():\r\n    x=1\r\n    y=2\r\n    return x\r\n\r\n\r\nclass   example_class:\r\n\r\n    def __init__( self,value ):\r\n        self.value=value\r\n\r\n    def multiply(self,n):\r\n        return self.value*n\r\n\r\n\r\nif __name__==\"__main__\":\r\n    result=add(1,2)\r\n    print( \"result:\",result )\r\n"}}} 


2026/03/17 11:35:04 [µlsp] ruff exited (exit status 2)
2026/03/17 11:35:04 [µlsp] ruff stderr:
ruff failed
  Cause: Failed to convert workspace URL to file path: file:///C%3A%5CUsers%5Cmyusername

error: Ruff crashed.`

@Andriamanitra
Copy link
Copy Markdown
Owner Author

@bjornasm that looks like yet another different Windows path-handling bug because I don't see the DEBUG: received diagnostics for document that is not open error in the log. My guess would be that the URI-encoded Windows path separator (%5C) is causing a problem. Maybe we should replace the \ with / before URI encoding on Windows?

@bjornasm
Copy link
Copy Markdown

How do you log the Lua errors? I tried to hardcode the path inside the function, but it seems like the crash is happening before that:

function absPathFromFileUri(uri)
    return "C:/Users/myusername"
end

Produces:

ruff failed
  Cause: Failed to convert workspace URL to file path: file:///C%3A%5CUsers%5Cmyusername

error: Ruff crashed. If you could open an issue at:

@Andriamanitra
Copy link
Copy Markdown
Owner Author

Andriamanitra commented Mar 17, 2026

How do you log the Lua errors?

You can use the log function:

mlsp/main.lua

Lines 636 to 638 in 8785474

function log(...)
micro.Log("[µlsp]", unpack(arg))
end

I tried to hardcode the path inside the function, but it seems like the crash is happening before that:

function absPathFromFileUri(uri)
    return "C:/Users/myusername"
end

Produces:

ruff failed
  Cause: Failed to convert workspace URL to file path: file:///C%3A%5CUsers%5Cmyusername

error: Ruff crashed. If you could open an issue at:

The workspace URL is set on startup in LSPClient:initialize, it doesn't go through absPathFromFileUri:

mlsp/main.lua

Lines 287 to 288 in 8785474

local wd, _ = go_os.Getwd()
local rootUri = fileUriFromAbsPath(wd)

edit: fixed link to point to code from this PR

@bjornasm
Copy link
Copy Markdown

bjornasm commented Mar 17, 2026

Seems like I might have figured it out - I can run , do you prefer me doing a PR review with the suggested changes?

A bit more debugging to do it seems, but looks like I am on the right way.

edit: Got it to work, no errors and the logs look fine. Let me know how I can contribute my code.

@Andriamanitra
Copy link
Copy Markdown
Owner Author

A new PR to be merged to this branch (windows-path-fix) would be the most convenient but I can work with whatever is easiest for you.

@bjornasm
Copy link
Copy Markdown

bjornasm commented Mar 25, 2026

I am working on this here https://github.com/bjornasm/mlsp/tree/windows-path-fix-debug and doing the windows tests from #74 (comment)

This test fails - but I am unsure that its intended to change the drive letter to be upper case? Windows itself doesn't require this afaik, but this might be an issue with the LSP's?
assert(absPathFromFileUri("file:///c:/AbCd") == "C:/AbCd") -- Windows only

Other than that all (windows) tests pass.

@Andriamanitra
Copy link
Copy Markdown
Owner Author

From https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#uri

Clients and servers should not assume that each other are encoding the same way (for example a client encoding colons in drive letters cannot assume server responses will have encoded colons). The same applies to casing of drive letters - one party should not assume the other party will return paths with drive letters cased the same as itself.

So it doesn't necessarily need to be specifically capitalized but it must map to the exact key used in openFiles (which currently comes directly from buf.AbsPath) regardless of how the language server capitalized the drive letter in the file:// URI.

@bjornasm
Copy link
Copy Markdown

From https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#uri

Clients and servers should not assume that each other are encoding the same way (for example a client encoding colons in drive letters cannot assume server responses will have encoded colons). The same applies to casing of drive letters - one party should not assume the other party will return paths with drive letters cased the same as itself.

So it doesn't necessarily need to be specifically capitalized but it must map to the exact key used in openFiles (which currently comes directly from buf.AbsPath) regardless of how the language server capitalized the drive letter in the file:// URI.

Interesting, thank you. Initially I think that means we have to pass it AbsPath or openFiles into absPathFromFileUri(...), which will be a bit messy due to a lot of changes. Cant we expect the case to be preserved from fileUriFromAbsPath(wd) , I guess maybe not as you could pass in other uris as well.

Is it possible to allways put all drives in upper case to make sure?

@Andriamanitra
Copy link
Copy Markdown
Owner Author

Is it possible to allways put all drives in upper case to make sure?

Yes, I think that would be a good idea. Maybe we could even uppercase the entire path (both file URIs from the server and buf.AbsPath from micro) on Windows?

@bjornasm
Copy link
Copy Markdown

bjornasm commented Apr 13, 2026

Is it possible to allways put all drives in upper case to make sure?

Yes, I think that would be a good idea. Maybe we could even uppercase the entire path (both file URIs from the server and buf.AbsPath from micro) on Windows?

Thank you for your input, I'll try that. Sorry for the late reply!

Edit:

I was able to implement this and it doesn't crash, but it doesn't format any code either weirdly. Tried with pylsp and ruff. I also get "no hover results" etc. Seems like its working on an empty file instead of the one I have open maybe.. Do you have some quick debugging to show the file its working on?

Edit2:

Found it, got to debug a bit more, will update with a new comment when I have made progress.

@bjornasm
Copy link
Copy Markdown

bjornasm commented Apr 13, 2026

Ok, I got it to work without errors. I couldn't test the LSP with python as I gotr no errors but also no results on format, hover etc, but I guess there must be something wrong in how I have set up the LSP. I did a quick test with markdown and that works, so I have to go back to see what the problem was with my python, but I guess that is a different issue.

Edit: Got it up and running for python lsp's as well, and you tests are passing.

@Andriamanitra
Copy link
Copy Markdown
Owner Author

I created a pull request #77 from your changes, let's continue the discussion there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Julia LanguageServer crashes on Windows: ERROR: Relative path `` is not valid.

3 participants