Gert-dev / php-ide-serenata

Atom IDE package that integrates the Serenata server to provide PHP code assistance
https://serenata.gitlab.io/
Other
275 stars 19 forks source link

Click to goto path incorrect. #480

Closed bpedroza closed 4 years ago

bpedroza commented 4 years ago

Since v 5.0.0 release, the click to goto function is not working properly.

When it goes to open the file, it is adding my project root twice.

For example: Project base path is C:\sites\mysite Relative file path is app/Foo.php

The requested path in the error is file:///C:/sites/mysite/sites/mysite/app/Foo.php

Error message:

PHP (Serenata) rpc.sendRequest textDocument/codeLens threw ResponseError: Could not find file "file:///C:/sites/mysite/sites/mysite/app/Foo.php" in index at handleResponse (C:\Users\bryanp.atom\packages\php-ide-serenata\node_modules\vscode-jsonrpc\lib\main.js:436:48) at processMessageQueue (C:\Users\bryanp.atom\packages\php-ide-serenata\node_modules\vscode-jsonrpc\lib\main.js:263:17) at Immediate.setImmediate (C:\Users\bryanp.atom\packages\php-ide-serenata\node_modules\vscode-jsonrpc\lib\main.js:247:13) at runCallback (timers.js:696:18) at tryOnImmediate (timers.js:667:5) at processImmediate (timers.js:649:5)

Gert-dev commented 4 years ago

Hi.

Thanks for taking the time to report an issue. However, this is not a bug in this package, but in the Serenata server.

I created an appropriate issue for you here and will follow up there.

bpedroza commented 4 years ago

Thanks for checking it out. I wasn't sure where it was.

Sorry for opening in the wrong project, and thanks for this great package!

Gert-dev commented 4 years ago

Thanks!

FYI, I posted an answer over at the Serenata issue tracker. It could be that I was wrong and the URI being generated in this package is just wrong, but I'll need some help figuring this out from someone who uses Windows to be sure of what works and what doesn't.

nicoloko002 commented 4 years ago

Hello, sorry to comment on a closed issue, but maybe it can help someone. I had the same issue with php-ide-serenata and using php-debug package too. So I debugged and found that in windows the path is being created without "C:\" in front of filepath. If someone is facing that same issue, take a look at my forked atom: https://github.com/nicoloko002/atom (See the release tab for the binnaries) It is just a fast workaround, but worked well for me =-)

bpedroza commented 3 years ago

@Gert-dev I was never able to figure this out. I'm still using 4.x of this package to get it to work.

Perhaps the comment from @nicoloko002 indicates a fix might be possible in this repo.

What do you think?