Skip to content
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

Installed PHP extension, but cannot use go to definition #16009

Open
1 task done
onhao opened this issue Aug 9, 2024 · 7 comments
Open
1 task done

Installed PHP extension, but cannot use go to definition #16009

onhao opened this issue Aug 9, 2024 · 7 comments
Labels
bug [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers linux php PHP programming language support

Comments

@onhao
Copy link

onhao commented Aug 9, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

截图录屏_选择区域_20240809100428

Environment

The installation of Ubuntu 24.04 deb has now been automatically upgraded to 0.147.2. This feature was available during the initial installation

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log
@onhao onhao added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Aug 9, 2024
@notpeter
Copy link
Member

notpeter commented Aug 9, 2024

Hi @onhao!

Are you using phpactor or intelephense?

If intelephense, do you have an intelephense license? 'Goto Type Definition' is a premium feature and requires an active license in ~/intelephense/licence.txt to work.

Can you restart Zed, attempt again and see if there's anything notable in your Zed log (download time, language server failed to start, etc)?

See also: Zed PHP Language Docs

@notpeter notpeter added linux php PHP programming language support language server An umbrella label for all language servers language server failure Language server doesn't work as expected and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Aug 9, 2024
@onhao
Copy link
Author

onhao commented Aug 10, 2024

When I first installed Zed, it was possible to display the parameters and returns provided by the defined function or method name by moving the mouse over it, but now it doesn't work either
As for jumping to the defined function, if permission is required, I really don't understand. Perhaps it's because I don't have permission.
There was also an error prompt function before, but now there is no error prompt function anymore

@onhao
Copy link
Author

onhao commented Aug 10, 2024

截图录屏_选择区域_20240810142140
1.No error prompts
2.Moving to function name without prompting input parameters and return
3. Move the reference VSCode or Sublime to the function name to display or jump to all files that reference the modified function

@onhao
Copy link
Author

onhao commented Aug 10, 2024

zed: open log

2024-08-10T14:33:21.194645779+08:00 [ERROR] server stderr: Some("")
2024-08-10T14:33:21.194658127+08:00 [INFO] retrying installation of language server "phpactor" in 1s
2024-08-10T14:33:22.19469516+08:00 [INFO] About to spawn test binary
2024-08-10T14:33:22.194714911+08:00 [WARN] test binary failed to launch
2024-08-10T14:33:22.194724464+08:00 [WARN] test binary check failed
2024-08-10T14:33:22.194733943+08:00 [INFO] beginning to reinstall server
2024-08-10T14:33:22.194749504+08:00 [INFO] deleting server container
2024-08-10T14:33:22.194836989+08:00 [ERROR] server container removal

Caused by:
No such file or directory (os error 2)
2024-08-10T14:33:22.194861562+08:00 [INFO] starting language server "phpactor", path: "/home/wuhao/www/new", id: 5
2024-08-10T14:33:22.207173193+08:00 [INFO] starting language server. binary path: "/home/wuhao/.local/share/zed/extensions/work/php/phpactor-2024.06.30.0/phpactor.phar", working directory: "/home/wuhao/www/new", args: ["language-server"]
2024-08-10T14:33:22.207345688+08:00 [ERROR] failed to start language server "phpactor": failed to spawn command. path: "/home/wuhao/.local/share/zed/extensions/work/php/phpactor-2024.06.30.0/phpactor.phar", working directory: "/home/wuhao/www/new", args: ["language-server"]
2024-08-10T14:33:22.207360899+08:00 [ERROR] server stderr: Some("")
2024-08-10T14:33:22.207373796+08:00 [ERROR] Hit 4 reinstallation attempts for "phpactor"
2024-08-10T14:33:24.43830688+08:00 [INFO] Installing default prettier and plugins: [("@prettier/plugin-php", "0.22.2"), ("prettier", "3.3.3")]
2024-08-10T14:33:24.438348504+08:00 [INFO] Node runtime install_if_needed
2024-08-10T14:33:28.593117978+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:28.74513163+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:38.712933823+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:38.752927174+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:38.808932776+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:44.448867243+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:44.488845821+08:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-10T14:33:45.945158965+08:00 [INFO] Initialized prettier with plugins: {"@prettier/plugin-php"}

@onhao
Copy link
Author

onhao commented Aug 10, 2024

But my computer at home is normal, why is that?
截图录屏_选择区域_20240810232136

@onhao
Copy link
Author

onhao commented Aug 20, 2024 via email

@onhao
Copy link
Author

onhao commented Aug 20, 2024

sudo php ./phpactor.phar language-server
PHP Fatal error: Uncaught PharException: internal corruption of phar "/home/wuhao/.local/share/zed/extensions/work/php/phpactor-2024.06.30.0/phpactor.phar" (truncated manifest header) in /home/wuhao/.local/share/zed/extensions/work/php/phpactor-2024.06.30.0/phpactor.phar:10
Stack trace:
#0 /home/wuhao/.local/share/zed/extensions/work/php/phpactor-2024.06.30.0/phpactor.phar(10): Phar::mapPhar()
#1 {main}
thrown in /home/wuhao/.local/share/zed/extensions/work/php/phpactor-2024.06.30.0/phpactor.phar on line 10

@github-actions github-actions bot added admin read Pending admin review triage Maintainer needs to classify the issue labels Nov 5, 2024
@notpeter notpeter removed triage Maintainer needs to classify the issue admin read Pending admin review labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers linux php PHP programming language support
Projects
None yet
Development

No branches or pull requests

2 participants