-
Notifications
You must be signed in to change notification settings - Fork 30
Auto download latest version of JDTLS #26
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
Conversation
|
On my machine, there's something very wrong with |
|
I removed my copy of jdtls and installed from this branch it downloaded as expected. I am not able to reproduce the issue you were having with it getting stuck "Downloading jdtls...". I renamed |
|
Interesting... 1) could you check if any of the contents of the renamed directory were removed and 2) I just added some extra debugging, could you try testing again and send Zed's logs? |
|
Yeah, so I pulled, rebuilt and restarted zed and got this: Zed.log 1``` 2024-12-12T17:26:47.954401-05:00 [INFO] attempting to start language server "jdtls", path: "/Users/peter/zcode/zed", id: 2 2024-12-12T17:26:47.95457-05:00 [INFO] Initializing default prettier with plugins {"prettier-plugin-java"} 2024-12-12T17:26:48.411644-05:00 [INFO] Installing default prettier and plugins: [("prettier-plugin-java", "2.6.5"), ("prettier", "3.4.2")] 2024-12-12T17:26:48.440034-05:00 [INFO] starting language server process. binary path: "/Users/peter/Library/Application Support/Zed/extensions/work/java/jdt-language-server-1.42.0-202411281516/bin/jdtls", working directory: "/Users/peter/zcode/zed", args: [] 2024-12-12T17:26:48.929457-05:00 [INFO] Initialized prettier with plugins: {"prettier-plugin-java"} 2024-12-12T17:26:50.077777-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Starting", "message": "Init..." } 2024-12-12T17:26:50.078011-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Starting", "message": "0% Starting Java Language Server" } 2024-12-12T17:26:51.740372-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Starting", "message": "21% Starting Java Language Server" } 2024-12-12T17:26:52.140695-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Starting", "message": "22% Starting Java Language Server" } 2024-12-12T17:26:52.140964-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "ProjectStatus", "message": "OK" } 2024-12-12T17:26:52.141112-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Starting", "message": "100% Starting Java Language Server" } 2024-12-12T17:26:52.141662-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Started", "message": "Ready" } 2024-12-12T17:26:52.142599-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "Starting", "message": "100% Starting Java Language Server" } 2024-12-12T17:26:52.151502-05:00 [WARN] unhandled capability registration: Registration { id: "30d57210-b34d-4eb8-b060-2bbfdeba65c7", method: "workspace/didChangeWorkspaceFolders", register_options: None } 2024-12-12T17:26:52.151723-05:00 [INFO] Language server with id 2 sent unhandled notification language/status: { "type": "ServiceReady", "message": "ServiceReady" } 2024-12-12T17:26:54.753469-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:26:55.852017-05:00 [INFO] Language server with id 2 sent unhandled notification language/eventNotification: { "eventType": 100, "data": "file:/Users/peter/zcode/zed/" } 2024-12-12T17:26:55.852391-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:26:57.564708-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:26:59.078649-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:00.585048-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:02.094191-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:03.603364-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:05.112192-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:06.621215-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:08.182152-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:09.692932-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:11.202581-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:12.713571-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:14.224109-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" 2024-12-12T17:27:15.735385-05:00 [WARN] skipping diagnostics update, no worktree found for path "/private/var/folders/86/wdxpwlqx2c31t7xpvwpt6zt40000gn/T/jdtls-5821b64a451562259b97b81a520ee86732b78a62/zed_67676eb8" ```Are you seeing lines like this in your logs? When I go into that directory it appears to be an duplicated copy of the worktree that contained the empty file ( It may be par for the course that jdtls duplicates the directory containing your file in an attempt to build out of tree, but it is not what I expected. It was trying to copy my shit (slowly) but instead of waiting many minutes I quit zed. When I restarted Zed this ended up in my Zed logs (looks like your Zed.log 2So I decided to see if this would happen with a clean slate. cd "$HOME/Library/Application Support/Zed/extensions/work/java"
mv jdt-language-server-1.42.0-{202411281516,fake3}
cd $(readlink -f $TMPDIR)/
ls -dl jdtls-*
# three directories, the one referenced above (zed; 10GB), one from when earlier this morning (zed-brainfuck; 44MB) and one from November 21 (empty).
rm -rf jdtls-*
# slow; takes a while to delete 10GB of stuff.
mkdir -p /tmp/java1/
touch /tmp/java1/foo.java
zedn /tmp/java1/ /tmp/java1/foo.javaSame panic: Zed.log PanicUninstalled the java extension, which cleaned up Have spent 0 time investigating, but now I can absolutely reproduce what you're seeing. |
|
Do you think you could test this same thing with the TOML extension? (Just because I happen to know that one specifically works similarly to the Java extension.) |
Also, carry on if uninstallation fails
482189a to
b0db64c
Compare
|
This shouldn't mess with the installation of other things like Lombok, so it should be safe to merge now. Will fix problems if/when they show up in the future. |

This PR rewrites the code for downloading JDTLS, the language server. Now, it fetches GitHub tags to determine the latest version. Since the extension is now capable of determining the best version to download, the
jdtls_versionsetting has been removed.