-
Notifications
You must be signed in to change notification settings - Fork 40
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
ST 4180 breaks LSP/gopls #6456
Comments
Just tried a fresh install and LSP-gopls works just fine. Do you see any errors in the console, lsp logs or lsp diagnostics?
We have a forum: https://forum.sublimetext.com/ |
Thanks. I don't see any errors in the console, the lsp logs are completely empty and the diagnostics panel show the happy text, even when it should not. |
Is the LSP server enabled? You can run a server test through the command palette. |
Yes, it's enabled; it works iff I have 4169 installed and does not iff I have 4180 installed. There is no other change. |
The last build that works is 4170; I could not test 4171 because it deadlocks at start-up. |
Have you run the server test through the command palette? |
That's the "LSP: Troubleshoot server" command? |
Yep |
Troubleshooting: gopls (working)Version
Server Test Run
Server Configuration
[
"gopls"
]
gopls
{
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
{}
{} Active view
{
"auto_complete_selector": null,
"lsp_active": null,
"syntax": null
} Project / Workspace
[
"/home/user/src/golang.org/x/tools/gopls"
]
LSP configuration{
"clients": {
"gopls": {
"build.buildFlags": [],
"enabled": true,
"initializationOptions": {
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
},
"rust-analyzer": {
"enabled": true
}
},
"log_debug": true,
"log_server": [
"panel"
],
"log_stderr": true,
"lsp_code_actions_on_save": {
"source.fixAll": true,
"source.organizeImports": true
},
"lsp_format_on_save": true
} System PATH
Troubleshooting: gopls (not working)Version
Server Test Run
Server Configuration
[
"gopls"
]
gopls
{
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
{}
{} Active view
{
"auto_complete_selector": null,
"lsp_active": null,
"syntax": null
} Project / Workspace
[
"/home/user/src/golang.org/x/tools/gopls"
]
LSP configuration{
"clients": {
"gopls": {
"build.buildFlags": [],
"enabled": true,
"initializationOptions": {
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
},
"rust-analyzer": {
"enabled": true
}
},
"log_debug": true,
"log_server": [
"panel"
],
"log_stderr": true,
"lsp_code_actions_on_save": {
"source.fixAll": true,
"source.organizeImports": true
},
"lsp_format_on_save": true
} System PATH
|
Looks like the only difference there is the system path. It also looks like you didn't run the troubleshooting with a go file open? Try it within a file it worked in previously. |
Troubleshooting: gopls (working)Version
Server Test Run
Server Configuration
[
"gopls"
]
gopls
{
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
{}
{} Active view
{
"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
"lsp_active": true,
"syntax": "Packages/Go/Go.sublime-syntax"
}
Project / Workspace
[
"/home/user/src/golang.org/x/tools/gopls"
]
LSP configuration{
"clients": {
"gopls": {
"build.buildFlags": [],
"enabled": true,
"initializationOptions": {
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
},
"rust-analyzer": {
"enabled": true
}
},
"log_debug": true,
"log_server": [
"panel"
],
"log_stderr": true,
"lsp_code_actions_on_save": {
"source.fixAll": true,
"source.organizeImports": true
},
"lsp_format_on_save": true
} System PATH
Troubleshooting: gopls (not working)Version
Server Test Run
Server Configuration
[
"gopls"
]
gopls
{
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
{}
{} Active view
{
"auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc",
"lsp_active": null,
"syntax": "Packages/Go/Go.sublime-syntax"
}
Project / Workspace
[
"/home/user/src/golang.org/x/tools/gopls"
]
LSP configuration{
"clients": {
"gopls": {
"build.buildFlags": [],
"enabled": true,
"initializationOptions": {
"analyses": {
"ST1003": false,
"ST1016": false
},
"gofumpt": false,
"staticcheck": true
}
},
"rust-analyzer": {
"enabled": true
}
},
"log_debug": true,
"log_server": [
"panel"
],
"log_stderr": true,
"lsp_code_actions_on_save": {
"source.fixAll": true,
"source.organizeImports": true
},
"lsp_format_on_save": true
} System PATH
|
This strongly hints to me at some broken logic in the editor. |
We don't touch the |
Yes, that's my point. The only change between the two cases that would actually have any impact is the version of This is the log with
|
That was from the non-working case. When I look at the logs for the working case, I see additional lines (extracted without verbosity here: all lines with LSP in them):
|
It looks like the entire gopls plugin is missing. There should be a line |
Sure, but that behaviour is correlated perfectly with the version of sublime that's installed; install 4180, that's the behaviour, downgrade to 4170 with no other change and it works. So it's not the plugin that's missing, it's the executable failing to find it or run it. |
Does that line get logged in build 4170? Is |
Maybe LSP-golsp is disabled by accident? FWIW, LSP and LSP-golsp runs perfectly well on ST4180 on Debian 12 on my end as well. I therefore doubt this issue being caused by ST. What are the reasons for not running latest LSP 2.2, which would use python 3.8 plugin-host? Maybe transion may require 1 or to ST restarts for all required libraries to get installed and loaded, but after that all should be fine. |
@kortschak is not using Also it looks like he is using old Package Control that doesn't support 3.8 dependencies so that would explain why LSP 2.2 would fail to run properly. So update your Package Control (maybe the Install step will work?) and then it should work with latest LSP. And yes, old versions of LSP are not compatible with latest ST versions due to a breaking change that @BenjaminSchaaf provided a fix for in latest LSP versions: sublimelsp/LSP#2427 |
I've just upgraded all (it took three restarts to stop complaining): Package Control, LSP and all other packages, and ST. I see exactly the same broken behaviour.
I tried this, and it doesn't work (as noted above, while the LSP doesn't work in the older version, with 2.2 even the menus are broken — visually). I will try hosing completely and restarting from scratch since people here claim that the current versions work. I won't have time to do this soon so this can go on the back-burner. |
Which line? The full 4170 logs are above (minus some paths that I've redacted).
No, it is not. As noted I'm using LSP alone for Go; the documentation support for ST by the gopls authors has been pretty weak after their initial love affair with ST, and I got it to work as it is and so have tried to avoid touching it. |
OK. I have hosed the original configuration, installed PC, LSP and LSP-gopls as described here on ST4180 and see exactly the same behaviour. Given that you all say this should work, my best guess is that this is due to the version of ubuntu (ancient at 18.04) that I'm running. |
Please provide ST console logs and troubleshooting output again, with all updates applied. Also try closing and reopening the go file |
I've just retried this. The first time, it gets itself into what seems to be an inconsistent state. After doing it a second time, I have managed to get it to work.
The first time I tried, the Package Control command palette items vanished. This all seems pretty brittle. I guess this is a solution, but now I need to figure out how to get the state of configuration across from the previous config to this now working one (open tabs in particular). Advice on this would be greatly appreciated. |
ST's "Install Package Control" main menu item installs Package Control 3. It will then update itself to Package Control 4, the next time packages are updated, either by manually calling "Upgrade Overwrite All" or by auto updater. Until that happened, no python 3.8 libraries are available and all depending plugins fail. A fix for this would require Will Bond to sign and upload latest release to packagecontrol.io to get an up-to-date OpenSSL3 ready starting point for all users. |
Maybe you can start with copying
|
That has done the trick. Thank you for your help with this (for others stumbling across this, some reinstalls/upgrades were required to get things into a consistent state, but the initial blat got the majority of things into place). |
I have experienced this exact issue. I'm on the "downgrade to 4169" troubleshoot step which works for now. |
Description of the bug
I upgraded from 4169 to 4180 a couple of days ago, this appears to have broken LSP. Confirmed by downgrading to 4169 again to recover functionality.
Steps to reproduce
I'm not going to start in safe mode since the problem is the impact on a plugin.
Expected behavior
A functional LSP
Actual behavior
No functional LSP
Sublime Text build number
4180
Operating system & version
Ubuntu 18.04
(Linux) Desktop environment and/or window manager
Gnome
Additional information
LSP version is 1.30.0. I tried upgrading this to 2.2.0 and this completely broke the LSP (worse than 4180 did), so I have rolled back both ST and LSP.
Did want to discuss via discord, but their client apparently no longer supports 18.04 and logging in via a browser requires more PII than I'm prepared to share with that company. It's unfortunate that there is no open mechanism for ST discussion any more.
OpenGL context information
No response
The text was updated successfully, but these errors were encountered: