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

ST 4180 breaks LSP/gopls #6456

Closed
kortschak opened this issue Aug 17, 2024 · 29 comments
Closed

ST 4180 breaks LSP/gopls #6456

kortschak opened this issue Aug 17, 2024 · 29 comments
Labels

Comments

@kortschak
Copy link

kortschak commented Aug 17, 2024

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.

  1. Have a working 4169 with the LSP plugin and gopls installed.
  2. Upgrade to 4180.
  3. See no functional LSP.

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

@kortschak kortschak changed the title ST 4180 breaks gopls ST 4180 breaks LSP/gopls Aug 17, 2024
@BenjaminSchaaf
Copy link
Member

Just tried a fresh install and LSP-gopls works just fine. Do you see any errors in the console, lsp logs or lsp diagnostics?

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.

We have a forum: https://forum.sublimetext.com/

@kortschak
Copy link
Author

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.

@BenjaminSchaaf
Copy link
Member

Is the LSP server enabled? You can run a server test through the command palette.

@kortschak
Copy link
Author

Yes, it's enabled; it works iff I have 4169 installed and does not iff I have 4180 installed. There is no other change.

@kortschak
Copy link
Author

kortschak commented Aug 17, 2024

The last build that works is 4170; I could not test 4171 because it deadlocks at start-up.

@BenjaminSchaaf
Copy link
Member

Have you run the server test through the command palette?

@kortschak
Copy link
Author

That's the "LSP: Troubleshoot server" command?

@BenjaminSchaaf
Copy link
Member

Yep

@kortschak
Copy link
Author

Troubleshooting: gopls (working)

Version

  • LSP: 1.2.10
  • Sublime Text: 4170

Server Test Run

  • exit code: 0
  • output

Server Configuration

  • command
[
  "gopls"
]
  • shell command
gopls
  • selector
source.go
  • priority_selector
source.go
  • init_options
{
  "analyses": {
    "ST1003": false, 
    "ST1016": false
  }, 
  "gofumpt": false, 
  "staticcheck": true
}
  • settings
{}
  • env
{}

Active view

  • File name
None
  • Settings
{
  "auto_complete_selector": null, 
  "lsp_active": null, 
  "syntax": null
}

Project / Workspace

  • folders
[
  "/home/user/src/golang.org/x/tools/gopls"
]
  • is project: False

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

  • /home/user/.local/bin
  • /home/user/bin
  • /home/user/.cargo/bin
  • /home/user/go/bin
  • /home/user/.autojump/bin
  • /home/user/.zplug/bin
  • /home/user/.local/bin
  • /home/user/bin
  • /home/user/.cargo/bin
  • /home/user/go/bin
  • /usr/local/sbin
  • /usr/local/bin
  • /usr/sbin
  • /usr/bin
  • /sbin
  • /bin
  • /usr/games
  • /usr/local/games
  • /snap/bin

Troubleshooting: gopls (not working)

Version

  • LSP: 1.2.10
  • Sublime Text: 4180

Server Test Run

  • exit code: 0
  • output

Server Configuration

  • command
[
  "gopls"
]
  • shell command
gopls
  • selector
source.go
  • priority_selector
source.go
  • init_options
{
  "analyses": {
    "ST1003": false, 
    "ST1016": false
  }, 
  "gofumpt": false, 
  "staticcheck": true
}
  • settings
{}
  • env
{}

Active view

  • File name
None
  • Settings
{
  "auto_complete_selector": null, 
  "lsp_active": null, 
  "syntax": null
}

Project / Workspace

  • folders
[
  "/home/user/src/golang.org/x/tools/gopls"
]
  • is project: False

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

  • /home/user/.local/bin
  • /home/user/bin
  • /home/user/.cargo/bin
  • /home/user/go/bin
  • /home/user/bin
  • /usr/local/sbin
  • /usr/local/bin
  • /usr/sbin
  • /usr/bin
  • /sbin
  • /bin
  • /usr/games
  • /usr/local/games
  • /snap/bin

@BenjaminSchaaf
Copy link
Member

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.

@kortschak
Copy link
Author

Troubleshooting: gopls (working)

Version

  • LSP: 1.2.10
  • Sublime Text: 4170

Server Test Run

  • exit code: 0
  • output

Server Configuration

  • command
[
  "gopls"
]
  • shell command
gopls
  • selector
source.go
  • priority_selector
source.go
  • init_options
{
  "analyses": {
    "ST1003": false, 
    "ST1016": false
  }, 
  "gofumpt": false, 
  "staticcheck": true
}
  • settings
{}
  • env
{}

Active view

  • File name
/home/user/src/golang.org/x/tools/gopls/main.go
  • Settings
{
  "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"
}
  • base scope
source.go

Project / Workspace

  • folders
[
  "/home/user/src/golang.org/x/tools/gopls"
]
  • is project: False

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

  • /home/user/.local/bin
  • /home/user/bin
  • /home/user/.cargo/bin
  • /home/user/go/bin
  • /home/user/bin
  • /usr/local/sbin
  • /usr/local/bin
  • /usr/sbin
  • /usr/bin
  • /sbin
  • /bin
  • /usr/games
  • /usr/local/games
  • /snap/bin

Troubleshooting: gopls (not working)

Version

  • LSP: 1.2.10
  • Sublime Text: 4180

Server Test Run

  • exit code: 0
  • output

Server Configuration

  • command
[
  "gopls"
]
  • shell command
gopls
  • selector
source.go
  • priority_selector
source.go
  • init_options
{
  "analyses": {
    "ST1003": false, 
    "ST1016": false
  }, 
  "gofumpt": false, 
  "staticcheck": true
}
  • settings
{}
  • env
{}

Active view

  • File name
/home/user/src/golang.org/x/tools/gopls/main.go
  • Settings
{
  "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"
}
  • base scope
source.go

Project / Workspace

  • folders
[
  "/home/user/src/golang.org/x/tools/gopls"
]
  • is project: False

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

  • /home/user/.local/bin
  • /home/user/bin
  • /home/user/.cargo/bin
  • /home/user/go/bin
  • /home/user/.autojump/bin
  • /home/user/.zplug/bin
  • /home/user/.local/bin
  • /home/user/bin
  • /home/user/.cargo/bin
  • /home/user/go/bin
  • /usr/local/sbin
  • /usr/local/bin
  • /usr/sbin
  • /usr/bin
  • /sbin
  • /bin
  • /usr/games
  • /usr/local/games
  • /snap/bin

@kortschak
Copy link
Author

Looks like the only difference there is the system path.

This strongly hints to me at some broken logic in the editor.

@BenjaminSchaaf
Copy link
Member

We don't touch the PATH on Linux. That "lsp_active": null, is suspect. Maybe enabling debug logs in the lsp settings could help narrow this down.

@kortschak
Copy link
Author

We don't touch the PATH on Linux.

Yes, that's my point. The only change between the two cases that would actually have any impact is the version of subl.

This is the log with log_debug: true in the LSP setting.

startup, version: 4180 linux x64 channel: stable
executable: /opt/sublime_text/sublime_text
application: /opt/sublime_text
working dir: /home/user/Downloads
packages path: /home/user/.config/sublime-text-3/Packages
state path: /home/user/.config/sublime-text-3/Local
zip path: /opt/sublime_text/Packages
zip path: /home/user/.config/sublime-text-3/Installed Packages
ignored_packages: ["Vintage"]
generating syntax summary
generating meta info summary
Unable to parse color value var(background) at Packages/Debugger/ColorSchemes/Monokai.sublime-color-scheme:5:27
pre session restore time: 1.88298
loading dictionary Packages/Language - English/en_US.dic
Unable to parse color value var(background) at Packages/Debugger/ColorSchemes/Monokai.sublime-color-scheme:5:27
startup time: 2.37779
git: located Sublime Merge installed at /opt/sublime_merge
git: using configuration from system git install
git: tracking working dir /home/user/Development/kortschak.io
font face "Times" could not be found, defaulting to "Monospace"
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading python 3.3 plugin 0_package_control_loader.00-package_control
reloading plugin Default.switch_file
reloading python 3.3 plugin 0_package_control_loader.01-pygments
first paint time: 3.21894
reloading python 3.3 plugin 0_package_control_loader.01-sublime_lib
reloading python 3.3 plugin 0_package_control_loader.10-lsp_utils
reloading plugin Default.symbol
reloading python 3.3 plugin 0_package_control_loader.10-wcwidth
reloading python 3.3 plugin 0_package_control_loader.40-ptyprocess
reloading python 3.3 plugin 0_package_control_loader.50-backrefs
reloading python 3.3 plugin 0_package_control_loader.50-bracex
reloading python 3.3 plugin 0_package_control_loader.50-dateutil
reloading python 3.3 plugin 0_package_control_loader.50-markupsafe
reloading python 3.3 plugin 0_package_control_loader.50-pathlib
reloading python 3.3 plugin 0_package_control_loader.50-pymdownx
reloading python 3.3 plugin 0_package_control_loader.50-pyte
reloading python 3.3 plugin 0_package_control_loader.50-python-markdown
reloading python 3.3 plugin 0_package_control_loader.50-pyyaml
reloading python 3.3 plugin 0_package_control_loader.51-python-jinja2
reloading python 3.3 plugin 0_package_control_loader.55-jsonschema
reloading python 3.3 plugin 0_package_control_loader.55-mdpopups
reloading python 3.3 plugin 0_package_control_loader.55-wcmatch
reloading python 3.3 plugin BracketHighlighter.bh_core
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin Pretty JSON.PrettyJson
reloading plugin Pretty JSON.PrettyJsonListeners
reloading plugin SideBarTools.SideBar
reloading plugin Debugger.start
<REDACTED>
reloading plugin Slyblime.apropos
Preparing stuff for SLY
reloading plugin Slyblime.compile
reloading plugin Slyblime.completion
reloading plugin Slyblime.custom_elements
reloading plugin Slyblime.debugger
reloading plugin Slyblime.inspector
reloading plugin Slyblime.output_commands
reloading plugin Slyblime.repl
reloading plugin Slyblime.session_management
reloading plugin Slyblime.sexpdata
reloading plugin Slyblime.sly
reloading plugin Slyblime.tracer
reloading plugin Slyblime.ui_view
reloading plugin Slyblime.util
reloading plugin Slyblime.workarounds
reloading plugin SublimeREPL.__init__
reloading plugin SublimeREPL.completions
reloading plugin SublimeREPL.lang_integration
reloading plugin SublimeREPL.run_existing_command
reloading plugin SublimeREPL.sublimerepl
reloading plugin SublimeREPL.sublimerepl_build_system_hack
reloading plugin SublimeREPL.text_transfer
reloading python 3.3 plugin BracketHighlighter.bh_logging
reloading python 3.3 plugin BracketHighlighter.bh_plugin
reloading python 3.3 plugin BracketHighlighter.bh_popup
reloading python 3.3 plugin BracketHighlighter.bh_regions
reloading python 3.3 plugin BracketHighlighter.bh_remove
reloading python 3.3 plugin BracketHighlighter.bh_rules
reloading python 3.3 plugin BracketHighlighter.bh_search
reloading python 3.3 plugin BracketHighlighter.bh_swapping
reloading python 3.3 plugin BracketHighlighter.bh_wrapping
reloading python 3.3 plugin BracketHighlighter.support
reloading python 3.3 plugin EditorConfig.EditorConfig
reloading python 3.3 plugin FileDiffs.file_diffs
reloading python 3.3 plugin Find++.DirectoryPanel
reloading python 3.3 plugin Find++.FindPlusPlus
reloading python 3.3 plugin Git.git_commands
reloading python 3.3 plugin GoGuru.goGuru
reloading python 3.3 plugin GoTests.GoTests
reloading python 3.3 plugin GoToTest.GoToTest
reloading python 3.3 plugin HexViewer.hex_checksum
reloading python 3.3 plugin HexViewer.hex_common
reloading python 3.3 plugin HexViewer.hex_editor
reloading python 3.3 plugin HexViewer.hex_finder
reloading python 3.3 plugin HexViewer.hex_highlighter
reloading python 3.3 plugin HexViewer.hex_inspector
reloading python 3.3 plugin HexViewer.hex_notify
reloading python 3.3 plugin HexViewer.hex_viewer
reloading python 3.3 plugin HexViewer.hex_writer
reloading python 3.3 plugin HexViewer.sum_hashes
reloading python 3.3 plugin HexViewer.support
reloading python 3.3 plugin HexViewer.tiger
reloading python 3.3 plugin HexViewer.whirlpool
reloading python 3.3 plugin LaTeX Word Count.WordCount
reloading python 3.3 plugin lispindent.commands
reloading python 3.3 plugin lispindent.indent
reloading python 3.3 plugin LSP-pyright.plugin
reloading python 3.3 plugin LSP-rust-analyzer.plugin
Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 308, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.3/importlib/__init__.py", line 90, in import_module
  File "<frozen importlib._bootstrap>", line 1584, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1565, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1532, in _find_and_load_unlocked
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1686, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/home/user/.config/sublime-text-3/Installed Packages/LSP-rust-analyzer.sublime-package/plugin.py", line 15, in <module>
ImportError: No module named 'LSP.plugin.locationpicker'
reloading python 3.3 plugin LSP.boot
reloading python 3.3 plugin OverrideAudit.override_audit
reloading python 3.3 plugin Package Control.1_reloader
reloading python 3.3 plugin Package Control.2_bootstrap
reloading python 3.3 plugin Package Control.Package Control
reloading python 3.3 plugin PackageDev._logging
reloading python 3.3 plugin PackageDev.main
reloading python 3.3 plugin Pandoc.Pandoc
reloading python 3.3 plugin Terminus.main
reloading python 3.3 plugin VCS Gutter.gutter_handlers
reloading python 3.3 plugin VCS Gutter.vcs_gutter
reloading python 3.3 plugin VCS Gutter.vcs_gutter_change
reloading python 3.3 plugin VCS Gutter.vcs_gutter_events
reloading python 3.3 plugin VCS Gutter.vcs_helpers
reloading python 3.3 plugin VCS Gutter.view_collection
reloading python 3.3 plugin WordingStatus.WordCount
reloading python 3.3 plugin GPG.gpg
reloading python 3.3 plugin LaTeXTools.01_reload_submodules
reloading python 3.3 plugin LaTeXTools.02_temp_file_cleanup
reloading python 3.3 plugin LaTeXTools.03_reset_phantoms
reloading python 3.3 plugin LaTeXTools.biblatex_crossref_completions
reloading python 3.3 plugin LaTeXTools.biblatex_field_name_completions
reloading python 3.3 plugin LaTeXTools.biblatex_name_completions
reloading python 3.3 plugin LaTeXTools.biblatex_snippet_completions
reloading python 3.3 plugin LaTeXTools.biblatex_syntax_listener
reloading python 3.3 plugin LaTeXTools.change_environment
reloading python 3.3 plugin LaTeXTools.create_mousemap
reloading python 3.3 plugin LaTeXTools.delete_temp_files
reloading python 3.3 plugin LaTeXTools.detect_spellcheck
reloading python 3.3 plugin LaTeXTools.getRegion
reloading python 3.3 plugin LaTeXTools.getTeXRoot
reloading python 3.3 plugin LaTeXTools.jumpto_anywhere
reloading python 3.3 plugin LaTeXTools.jumpto_tex_file
reloading python 3.3 plugin LaTeXTools.jumpToPDF
reloading python 3.3 plugin LaTeXTools.kpsewhich
reloading python 3.3 plugin LaTeXTools.latex_cite_completions
reloading python 3.3 plugin LaTeXTools.latex_cwl_completions
reloading python 3.3 plugin LaTeXTools.latex_directive_completions
reloading python 3.3 plugin LaTeXTools.latex_env_completions
reloading python 3.3 plugin LaTeXTools.latex_fill_all
reloading python 3.3 plugin LaTeXTools.latex_glossary_completions
reloading python 3.3 plugin LaTeXTools.latex_input_completions
reloading python 3.3 plugin LaTeXTools.latex_installed_packages
reloading python 3.3 plugin LaTeXTools.latex_own_command_completions
reloading python 3.3 plugin LaTeXTools.latex_ref_completions
reloading python 3.3 plugin LaTeXTools.latexCommand
reloading python 3.3 plugin LaTeXTools.latexDocumentationViewer
reloading python 3.3 plugin LaTeXTools.latexEnvCloser
reloading python 3.3 plugin LaTeXTools.latexEnvironment
reloading python 3.3 plugin LaTeXTools.latextools_cache_listener
reloading python 3.3 plugin LaTeXTools.latextools_default_settings
reloading python 3.3 plugin LaTeXTools.latextools_plugin
reloading python 3.3 plugin LaTeXTools.latextools_sublime_version_listener
reloading python 3.3 plugin LaTeXTools.makePDF
reloading python 3.3 plugin LaTeXTools.migrate
reloading python 3.3 plugin LaTeXTools.open_detexify
reloading python 3.3 plugin LaTeXTools.parseTeXlog
reloading python 3.3 plugin LaTeXTools.search_commands
reloading python 3.3 plugin LaTeXTools.system_check
reloading python 3.3 plugin LaTeXTools.texcount
reloading python 3.3 plugin LaTeXTools.texMacro
reloading python 3.3 plugin LaTeXTools.texSections
reloading python 3.3 plugin LaTeXTools.texSyntaxListener
reloading python 3.3 plugin LaTeXTools.toc_quickpanel
reloading python 3.3 plugin LaTeXTools.toggle_auto
reloading python 3.3 plugin LaTeXTools.toggle_focus
reloading python 3.3 plugin LaTeXTools.toggle_fwdsync
reloading python 3.3 plugin LaTeXTools.toggle_show
reloading python 3.3 plugin LaTeXTools.toggle_view_on_build
reloading python 3.3 plugin PlainTasks.APlainTasksCommon
reloading python 3.3 plugin PlainTasks.PlainTasks
reloading python 3.3 plugin PlainTasks.PlainTasksDates
reloading python 3.3 plugin PlainTasks.PlainTasksToHTML
reloading python 3.3 plugin PlainTasks.plist_parser
reloading python 3.3 plugin SendCode.choose_prog
reloading python 3.3 plugin SendCode.install_xdotool
reloading python 3.3 plugin SendCode.send_code
reloading python 3.3 plugin SendCode.settings
reloading python 3.3 plugin Sourcegraph.sourcegraph
reloading python 3.3 plugin SublimeLinter.__init__
reloading python 3.3 plugin SublimeLinter._init
reloading python 3.3 plugin SublimeLinter.active_linters_view
reloading python 3.3 plugin SublimeLinter.busy_indicator_view
reloading python 3.3 plugin SublimeLinter.goto_commands
reloading python 3.3 plugin SublimeLinter.highlight_view
reloading python 3.3 plugin SublimeLinter.log_handler
reloading python 3.3 plugin SublimeLinter.message_view
reloading python 3.3 plugin SublimeLinter.panel_view
reloading python 3.3 plugin SublimeLinter.quick_actions
reloading python 3.3 plugin SublimeLinter.status_bar_view
reloading python 3.3 plugin SublimeLinter.sublime_linter
plugins loaded
GoGuru: ('debug:', False)
GoGuru: ('use_golangconfig', False)
GoGuru: ('version:', '0.1.22')
LSP: enabled configs: LSP-pyright, gopls, rust-analyzer
LSP: disabled configs: clangd, dart, elixir-ls, erlang-ls, flow, haskell-ide-engine, jdtls, ocaml, polymer-ide, pyls, rlang, ruby, sorbet, sourcekit-lsp
OverrideAudit: Initializing
OverrideAudit: Sublime version has changed; generating automatic report
Loaded LaTeXTools plugins ['ref_fill_all_helper', 'env_fill_all_helper', 'directive_fill_all_helper', 'glossary_fill_all_helper', 'fill_all_helper', 'input_fill_all_helper', 'cite_fill_all_helper', 'pdf_builder'] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/builders/pdfBuilder.py
Loaded LaTeXTools plugins ['traditional_builder', 'basic_builder', 'simple_builder', 'script_builder'] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/builders
SublimeLinter: log_handler.py:74      Logging installed; log level INFO
INFO:SublimeLinter:Logging installed; log level INFO
SublimeLinter: sublime_linter.py:74   debug mode: on
INFO:SublimeLinter.sublime_linter:debug mode: on
SublimeLinter: sublime_linter.py:75   version: unknown
INFO:SublimeLinter.sublime_linter:version: unknown
Debugger: [startup]
Debugger: [finished]
Loading LaTeXTools plugins...
Loaded LaTeXTools plugins ['base_viewer'] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/viewers/base_viewer.py
Running "/usr/bin/gs -version"
Loaded LaTeXTools plugins ['sumatra_viewer', 'zathura_viewer', 'skim_viewer', 'evince_viewer', 'preview_viewer', 'okular_viewer', 'command_viewer'] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/viewers
Loaded LaTeXTools plugins ['new_bibliography', 'traditional_bibliography'] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/bibliography_plugins
Loaded LaTeXTools plugins [] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/builders/pdfBuilder.py
Loaded LaTeXTools plugins [] from path /home/user/.config/sublime-text-3/Packages/LaTeXTools/builders
SublimeLinter: sublime_linter.py:345  Delay linting 'LSP.sublime-settings' for 0.0s
INFO:SublimeLinter.sublime_linter:Delay linting 'LSP.sublime-settings' for 0.0s
SublimeLinter: sublime_linter.py:361  No installed linter matches the view.
INFO:SublimeLinter.sublime_linter:No installed linter matches the view.
reloading settings Packages/User/gpg.sublime-settings
OverrideAudit: No packages with expired overrides found
SublimeLinter: sublime_linter.py:345  Delay linting 'db.go' for 0.0s
INFO:SublimeLinter.sublime_linter:Delay linting 'db.go' for 0.0s
SublimeLinter: sublime_linter.py:361  No installed linter matches the view.
INFO:SublimeLinter.sublime_linter:No installed linter matches the view.

@kortschak
Copy link
Author

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):

reloading python 3.3 plugin LSP-pyright.plugin

reloading python 3.3 plugin LSP-rust-analyzer.plugin

ImportError: No module named 'LSP.plugin.locationpicker'

reloading python 3.3 plugin LSP.boot

LSP: enabled configs: LSP-pyright, gopls, rust-analyzer

LSP: disabled configs: clangd, dart, elixir-ls, erlang-ls, flow, haskell-ide-engine, jdtls, ocaml, polymer-ide, pyls, rlang, ruby, sorbet, sourcekit-lsp

LSP: starting ['gopls'] in /home/user/src/...

LSP: gopls: Supported execute commands: ['gopls.add_dependency', 'gopls.add_import', 'gopls.add_telemetry_counters', 'gopls.apply_fix', 'gopls.assembly', 'gopls.change_signature', 'gopls.check_upgrades', 'gopls.client_open_url', 'gopls.diagnose_files', 'gopls.doc', 'gopls.edit_go_directive', 'gopls.extract_to_new_file', 'gopls.fetch_vulncheck_result', 'gopls.free_symbols', 'gopls.gc_details', 'gopls.generate', 'gopls.go_get_package', 'gopls.list_imports', 'gopls.list_known_packages', 'gopls.maybe_prompt_for_telemetry', 'gopls.mem_stats', 'gopls.modules', 'gopls.packages', 'gopls.regenerate_cgo', 'gopls.remove_dependency', 'gopls.reset_go_mod_diagnostics', 'gopls.run_go_work_command', 'gopls.run_govulncheck', 'gopls.run_tests', 'gopls.scan_imports', 'gopls.start_debugging', 'gopls.start_profile', 'gopls.stop_profile', 'gopls.test', 'gopls.tidy', 'gopls.toggle_gc_details', 'gopls.update_go_sum', 'gopls.upgrade_dependency', 'gopls.vendor', 'gopls.views', 'gopls.workspace_stats']

LSP: gopls: supported code action kinds: ['gopls.doc.features', 'quickfix', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source.assembly', 'source.doc', 'source.fixAll', 'source.freesymbols', 'source.organizeImports']

LSP: gopls: registering capability: didChangeConfigurationProvider

@BenjaminSchaaf
Copy link
Member

It looks like the entire gopls plugin is missing. There should be a line reloading plugin LSP-gopls.boot at startup.

@kortschak
Copy link
Author

kortschak commented Aug 17, 2024

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.

@BenjaminSchaaf
Copy link
Member

Does that line get logged in build 4170? Is LSP-gopls in the list shown by running Package Control: List Packages from the command palette in 4180 (and what version is it showing)?

@deathaxe
Copy link
Collaborator

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.

@rchl
Copy link

rchl commented Aug 17, 2024

@kortschak is not using LSP-gopls. He has custom gopls config defined.

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

@kortschak
Copy link
Author

kortschak commented Aug 17, 2024

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.

What are the reasons for not running latest LSP 2.2

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.

@kortschak
Copy link
Author

Does that line get logged in build 4170?

Which line? The full 4170 logs are above (minus some paths that I've redacted).

Is LSP-gopls in the list shown by running Package Control: List Packages from the command palette in 4180 (and what version is it showing)?

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.

@kortschak
Copy link
Author

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.

@rchl
Copy link

rchl commented Aug 18, 2024

Please provide ST console logs and troubleshooting output again, with all updates applied.

Also try closing and reopening the go file

@kortschak
Copy link
Author

kortschak commented Aug 18, 2024

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.

  1. move original config from ~/.config and start sublime text (4180)
  2. install package control
  3. package control install LSP
  4. restart
  5. be told to restart again
  6. install LSP again (because it didn't install the first time though gave no indication of this at the time)
  7. install LSP-gopls
  8. restart

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.

@deathaxe
Copy link
Collaborator

The first time I tried, the Package Control command palette items vanished.

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.

@deathaxe
Copy link
Collaborator

... get the state of configuration across from the previous config ...

Maybe you can start with copying

  1. ~/.config/sublime-text/Local
    • contains, session and thus open tabs
  2. ~/.config/sublime-text/Packages/User
    • contains your preferences and list of installed packages (PC will re-install all of them automatically, when starting ST)

@kortschak
Copy link
Author

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).

@antonismark
Copy link

antonismark commented Aug 27, 2024

I have experienced this exact issue. I'm on the "downgrade to 4169" troubleshoot step which works for now.
OS Windows 10, if that matters.
for me, it broke copilot. its strange, because all settings are there when opening them from palette, no errors or anything. I'm able to see lsp options in ctrl+shift+p, lsp diagnostics panel says "No diagnostics. Well done!". It just wont start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants