Open siegel opened 3 years ago
After the didOpen and didChange notifications you should see something like
start perl -c
perl -c rc=0 out= errout=- syntax OK
do you?
There is nothing like that in the log output from the server. I do see an acknowledgement when I send didOpenDocument
:
2021-06-06 07:43:21.124: stderr output from server: LS: ---> Request: {
"method" : "textDocument/didOpen",
"jsonrpc" : "2.0",
"params" : {
"textDocument" : {
"uri" : "file:///Users/siegel/Dropbox/Apps/Redacted/Scripts/Hello%20World.pl",
"version" : 1,
"text" : "#!/usr/bin/env perl -w\n\nuse strict;\n\nprint \"Hello, Perl!\\n\";\n",
"languageId" : "perl"
}
}
}
LS: handle_req id=
LS: apply_all_roles (Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x7f84e47968f0), Perl::LanguageServer::Methods::textDocument, Perl/LanguageServer/Methods/textDocument.pm)
2021-06-06 07:43:21.129: stderr output from server: LS: method=_rpcnot_didOpen
LS: done handle_req id=1000000001
LS: start aio read
2021-06-06 07:43:31.122: stderr output from server: ##### 1 #####
running: {} coros: {}
2021-06-06 07:43:41.126: stderr output from server: ##### 2 #####
running: {} coros: {}
And the running: {} coros: {}
logging repeats every few seconds, with an increasing number. There is nothing else logged to stderr by the server, and no indication of it running perl -c
.
Further, if I make a nonsense edit in the file, the server logs to stderr:
2021-06-06 09:27:38.043: stderr output from server: LS: read data={"jsonrpc":"2.0","method":"textDocument\/didChange","params":{"contentChanges":[{"text":"#!\/usr\/bin\/env perl -w\n\nuse strict;\n\nprint \"Hello, Perl!\\n\";\n\nfoobar;\n"}],"textDocument":{"uri":"file:\/\/\/Users\/siegel\/Dropbox\/Apps\/BBEdit\/Scripts\/Hello%20World.pl","version":2}}}
LS: read header={ "Content-Length" => 289 }
2021-06-06 09:27:38.044: stderr output from server: LS: ---> Request: {
"method" : "textDocument/didChange",
"jsonrpc" : "2.0",
"params" : {
"textDocument" : {
"version" : 2,
"uri" : "file:///Users/siegel/Dropbox/Apps/BBEdit/Scripts/Hello%20World.pl"
},
"contentChanges" : [
{
"text" : "#!/usr/bin/env perl -w\n\nuse strict;\n\nprint \"Hello, Perl!\\n\";\n\nfoobar;\n"
}
]
}
}
LS: handle_req id=
2021-06-06 09:27:38.044: stderr output from server: LS: method=_rpcnot_didChange
2021-06-06 09:27:38.044: stderr output from server: LS: done handle_req id=1000000006
Again, no indication of running perl -c
, and diagnostics are not returned.
Is there any additional logging or diagnostics that I can enable, which might help figure out why the server doesn't seem to be running perl -c
when a document is opened? (The server is being started with --debug --log-level 2
.)
Are you running on Windows or on Linux? There is an issue with starting child processes on Windows, for which I wasn't able to figure out the reason so far.
Are you running on Windows or on Linux?
Neither - macOS (10.15.7, Intel x86_64), perl --version
reports:
This is perl 5, version 34, subversion 0 (v5.34.0) built for darwin-thread-multi-2level
I'm writing a new LSP client (i.e. one that's not VS Code), and I'd like to support the Perl language server. Basic integration is working, but I'm finding that the server never reports any diagnostics, even for obvious syntax errors.
When sending
initialize
, my client reports the following capabilities:Subsequently, I send a
textDocument/didOpen
for an example file provided by a beta tester:Then, after some (unsuccessful) random experimenting with
textDocument/definition
andworkspace/symbol
, I make a trivial edit to introduce a syntax error. The server logs this:However, the server never returns a
textDocument/publishDiagnostics
notification, and there's nothing in the stderr output that indicates why this might be. Is there an additional command-line flag I can use to enable additional debug output to stderr, or is there someplace else I should be looking for logging to explain this behavior?Thanks for any assistance you can provide.