-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on notification jumpDefinition #23
Comments
Also pasted the contents to https://l.perl.bot/ |
You pasted the direct link to the perlbot instead of your pasted content :P Can you try it again? |
Sorry I don't understand. I pasted the exact same contents into the text field that is also in the attachment. I think I did exactly what you told me
As I said it is the same log contents you got in the coc-perl.log. Sorry again but what else can I do? I do not have other contents than that in coc-perl.log but I really didn't paste just a link. Also: the perl bot seems to expect perl code. But the log file contens is just plain text, no code ?!? Or should I paste my test script? But how can the perl bot connect to my language server? |
I think I know now what contents you mean. I pasted it into the text field within the perl bot but it is still complaining after the commit about missing semicolons which is understandable because it is log contents, not perl code. |
Perhaps this one helps: https://l.perl.bot/p/leamif ? What I noticed while fighting with the config and the log: After I added the two line to the config (log file and level) the language server doesn't give any visual sign of its existance. No error message, no marking of syntax errors. Only CocInfo shows that it is running. After I removed the logging from the config everything is back to "normal" (still no working gd but with a message again). |
Yes!! This data! :-D @bukephalos, I should've explained better, sorry. It's indeed the content I was expecting :) However, I was expecting errors, but things seems fine.
Something similar to the following:
However, since your setup is misbehaving something else might appear. |
Here it is: https://l.perl.bot/p/6pmhha |
Another try: https://l.perl.bot/p/lkhnqo I did a text search on "dosomething" -- it was not found in the log. Since I also do not see the error message ("definition not found") when pressing "gd" with logging enabled: is it possible that the whole call is ignored for whatever reason when logging is enabled??? I will give it another try on a different machine (the tests very done on an up to date Linux Mint) but I also have some Ubuntu 22.04 server VMs around. Update: Tried it. Almost the same result. Only difference I could see is that even without logging the "definition not found" message is not shown on the Ubuntu server. |
Things are really odd.
No, the logging has no effect on the results of an operation.
This error happens when the language server underneath isn't running for some reason (or if the server doesn't support the operation, which isn't true in our case). But ok, lets try something else:
EDIT: I'm asking these new information because I just noticed that in your first comment (in this issue) the command executing the server after the extension initialization had a typo, which would cause the server to
The typo I saw was
But in case |
Indeed. Thanks for your patience! I also noticed what you identitied as a typo but attributed it to a cut and paste issue. After all the syntax check works and it also has to call run, doesn't it? Also I doubt that it really is a coc-nvim/coc-perl issue since I got the same problem in VScode. This is why I tried (on the Ubuntu VM) to downgrade Perl::LanguageServer to 2.4.0 but with the same result. |
🤦 Yeap, you're right. I would even ask if you don't have anything in your ... let me think ... |
coc.nvim version: 0.0.82-b7375d5f 2023-01-30
G/GR/GRICHTER/Perl-LanguageServer-2.5.0.tar.gz (with the first commit of your fix applied by hand)
This VM I downgraded to 2.4.0 (s. --version). The run looks fine:
|
@bukephalos are you trying to open a file in the same directory you're
or are you trying to open the file somewhere else? Like:
I was able to "partially" reproduce the error you're seeing, when editing a file outside the workdir I'm currently in. |
Still possible since I have quite a software stack I install on most of my systems. Could be the same trouble maker on both. I once had a really long debugging session where the problem only appeared with a specific version of the "Want" module that was somewhere deep within the dependency chain. I still have a laptop I can try and perhaps set up a totally clean VM (will take some time) |
I am using plain vim not nvim and doing the first case (first cd then open without a path:
And as I said, it also happens in VScode but there only with my test script, it works within the Perl::LanguageServer source code |
No need, I might have an idea on what's happening.
Does it?! And in your test code it isn't? hahaha.. ok.. I'll check something, might take some time though. |
That's why my first suspition was that I had a misunderstanding on my side, like that it only works with methods or such. I'll wait for your findings with lots of hope... :-))) |
@bukephalos, hi again. If you move your test.pl to any other folder other than your home dir, something like |
We are getting closer :-) with "cd test/ && vim test.pl" gd does indeed work! gd on a variable still doesn't work in neither variant. Is it supposed to work, too? In the meantime I also did a few tests with PerlNavigator and there it also works with variables. |
Ok, so I might have found the culprit, but not sure how to solve yet. The issue is on the server. |
Here my test script, opened with "cd test && vim test.pl":
Then move the cursor on the "s" of "print $somevar;" press "gd" => "definition not found" |
It just works here, lol. |
Addition: just tested with VScode: even after cd test gd doesn't work for subs (the exact test that works with vim). To make things even more weird (new test):
=> both(!) gd variants work (sub and var) ???????? |
Where's the "table flip" emoticon/gif when I need it? lol! So, just to give you a perspective on what I've found on the server: richterger/Perl-LanguageServer/issues/186 |
Do you think there is a chance for a fix or is the only solution to keep the workspace out of the home dir? |
@bukephalos I'm really sorry, this week things got a bit crazy around here and had no time to check the fix for this situation. For now, I suggest keeping the workspace out of home dir. But I'll do my best to get a fix for it until/during weekend. |
@bukephalos, even though I didn't get to the bottom of this issue, coc-perl now officially support PerlNavigator :-) |
As mentioned in another issue (#19) the "go to definition" command doesn't work. As suggested I did some logging
and (hopefully) attached the log file:
coc-perl.log
Funny, it says the language server doesn't support it, though it certainly should (and the server installation worked without error)
The text was updated successfully, but these errors were encountered: