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

1.1.0 appears to break ST3 compatibility #46

Closed
juliangarnier opened this issue Nov 25, 2023 · 10 comments
Closed

1.1.0 appears to break ST3 compatibility #46

juliangarnier opened this issue Nov 25, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@juliangarnier
Copy link

juliangarnier commented Nov 25, 2023

Hi, I just posted a similar issue for the LSP-html plugin at LSP-html GitHub Issue #45, which seems to be related.

I'm using ST 3211 and it looks like LSP-css is incompatible with ST3 since 1.1.0.
I installed LSP-css via package control, restarted Sublime and got this error in the console:

reloading plugin LSP-css.plugin
Traceback (most recent call last):
  File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 125, 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 "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP-css.sublime-package/plugin.py", line 2, in <module>
ImportError: cannot import name Session
reloading plugin LSP-css.types

Manually downloading 1.0.15 to my Packages folder fixed the issue.

I know that ST3 is probably not your priority, but wanted to surface this issue just in case you didn't noticed.

Thanks.

@jfcherng
Copy link
Collaborator

Thanks. Fixed in 1.1.3.

@jfcherng jfcherng added the bug Something isn't working label Nov 26, 2023
@juliangarnier
Copy link
Author

Thanks for your quick response.

Just removed 1.0.15 from the Package folder and uninstalled lsp-css and, installed 1.1.3 via the package control, restarted Sublime and got this new error:

Error handling None
Traceback (most recent call last):
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/rpc.py", line 323, in receive_payload
    handler(result)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/sessions.py", line 375, in _handle_initialize_result
    self._on_post_initialize(self)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 560, in _handle_post_initialize
    self._handlers.on_initialized(session.config.name, self._window, session.client)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP.sublime-package/plugin/core/registry.py", line 54, in on_initialized
    client_initialization_listeners[config_name](client)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Lib/python3.3/lsp_utils/_client_handler/language_handler.py", line 115, in on_initialized
    self.on_ready(api)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP-css.sublime-package/plugin.py", line 33, in on_ready
    session = self.weaksession()
AttributeError: 'LspCssPlugin' object has no attribute 'weaksession'

@jfcherng
Copy link
Collaborator

That looks like we need to make a legacy branch for ST 3.

@juliangarnier
Copy link
Author

juliangarnier commented Nov 26, 2023 via email

@juliangarnier
Copy link
Author

Also noticed the same type of error in lsp-json :

  File "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 125, 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 "/Applications/Sublime Text 3.app/Contents/MacOS/sublime_plugin.py", line 1199, in load_module
    exec(compile(source, source_path, 'exec'), mod.__dict__)
  File "/Users/juliangarnier/Library/Application Support/Sublime Text 3/Installed Packages/LSP-json.sublime-package/commands.py", line 1, in <module>
ImportError: cannot import name LspTextCommand

I'm afraid this error is related to a change introduced to a lot of languages...

@jfcherng
Copy link
Collaborator

jfcherng commented Nov 26, 2023

Also noticed the same type of error in lsp-json :
I'm afraid this error is related to a change introduced to a lot of languages...

Yeah. I think no one among LSP devs still uses ST 3.

jfcherng added a commit to jfcherng-sublime/ST-sublimelsp-repository that referenced this issue Nov 26, 2023
They have been not working for ST 3 for quite a while actually...

sublimelsp/LSP-css#46
sublimelsp/LSP-html#45

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
@jfcherng jfcherng reopened this Nov 26, 2023
rwols pushed a commit to sublimelsp/repository that referenced this issue Nov 26, 2023
They have been not working for ST 3 for quite a while actually...

sublimelsp/LSP-css#46
sublimelsp/LSP-html#45

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
@juliangarnier
Copy link
Author

Also noticed the same type of error in lsp-json :
I'm afraid this error is related to a change introduced to a lot of languages...

Yeah. I think no one among LSP devs still uses ST 3.

Understandable, the only reason I'm still using ST 3 is because ST 4 has worse performances for the type of work I'm doing, at least on my current machine.

@predragnikolic
Copy link
Member

I would suggest reporting performance issues to https://github.com/sublimehq/sublime_text

LSP functions much better with the Sublime Text 4 API.
And it's the way forward.

Some LSP features don't work well or are buggy due to API limitations in ST3.

@juliangarnier
Copy link
Author

Already reported here sublimehq/sublime_text#6199 (comment).
Basically it makes working on projects using a lot of GPU ressources close to impossible with ST 4 since ST 4 also needs the GPU to render the UI.
ST 3 uses the CPU for rendering, so the UI stays responsive even if my GPU is under pressure.
I'm afraid I have to stick with ST3 and wait to get a more powerful GPU in order to use ST 4.

@jfcherng
Copy link
Collaborator

Closed since [st3-1.2.0](https://github.com/sublimelsp/LSP-css/releases/tag/st3-1.2.0) has been on Package Control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants