phpactor / coc-phpactor

Phpactor CoC Extension
https://github.com/phpactor/phpactor
MIT License
28 stars 3 forks source link

Allow to change verbosity level of the langserver #9

Open Taluu opened 3 years ago

Taluu commented 3 years ago

We can't specify if we want a quit, v, vv or vvv mode for the phpactor client. We should probably see how it can be done.

dantleech commented 3 years ago

Can you elaborate? How is this relating to the coc-phpactor extension? or how would it be useful?

Taluu commented 3 years ago

It is related because coc-phpactor is responsible to launch the phpactor langserver (through the command phpactor language-server), so adding an argument or option (here -vvv for example) should be done on coc-phpactor extension side.

It is useful when the langserver crashes, as having <date> INFO (pid:<pid>) [language-client-index] - Language server "phpactor" started with <pid> in :CocInfo isn't quite useful after a coc error phpactor server crashed 5 times in the last 3 minutes. The server will not be restarted, don't you think ? It could allow us to have more details when looking up what went wrong.

dantleech commented 3 years ago

Agree increased verbosity can be useful for seeing the stack trace etc, so happy to include a verbosity setting.

But Phpactor would show the error at least when it crasehs. Does :CocCommand workspace.showOutput give the same output as :CocInfo ?

Taluu commented 3 years ago

I wasn't the one on who that crashed (just converted someone to phpactor :tada:). will keep that in mind next time. :}

(His problem was that indexing the vendor directory took too much memory, as he has a memory_limit on his php cli config ; triggering it manually in console with -d memory_limit=-1 did the trick)

dantleech commented 3 years ago

develop improves that a bit - it now shows how much memory is being consumed in the indexing progress notification.

dantleech commented 3 years ago

Also if the kernel is killing the process, there's nothing interesting to see

Taluu commented 3 years ago

Wouldn't we have at least a "tried to allocate ..." on the indexing ?

dantleech commented 3 years ago

oh maybe - I've just been seeing lots of Process killed kernel messages recently due to memory :smile: