daveleroy / SublimeDebugger

Graphical Debugger for Sublime Text for debuggers that support the debug adapter protocol
MIT License
366 stars 41 forks source link

Debugger raising TypeError #261

Closed LDAP closed 2 months ago

LDAP commented 2 months ago

Debugger does not start and logs:

Traceback (most recent call last):
  File "/home/lucas/.config/sublime-text/Packages/Debugger/modules/debugger.py", line 69, in get
    instance = Debugger(window, skip_project_check=skip_project_check)
  File "/home/lucas/.config/sublime-text/Packages/Debugger/modules/debugger.py", line 90, in __init__
    self.on_session_output = core.Event[dap.Session, dap.OutputEvent]()
  File "./python3.8/typing.py", line 261, in inner
  File "./python3.8/typing.py", line 897, in __class_getitem__
  File "/home/lucas/.config/sublime-text/Lib/python38/typing_extensions.py", line 2691, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} {things}"
TypeError: Too many parameters for <class 'Debugger.modules.core.event.Event'>; actual 2, expected 1
daveleroy commented 2 months ago

Where are you getting the typing_extensions library from because that seems like a bug in the implementation to me

LDAP commented 2 months ago

I didn't do anything special so it must be shipped with ST or package control.

predragnikolic commented 2 months ago

LSP added typing_extensions this Friday as a dependency -> https://github.com/sublimelsp/LSP/releases/tag/4070-2.0.1

So I would assume that this is the origin how LDAP got typing_extensions

daveleroy commented 2 months ago

https://github.com/python/typing_extensions/issues/126 is the feature that is missing.

Anyone doing something similar by trying to import typing_extensions when its available (such as doing type checking) and uses a feature this library doesn't support is going to break (probably only this package tbh).

LDAP commented 2 months ago

Is there a quick workaround since I need currently both LSP and Debugger?

predragnikolic commented 2 months ago

@daveleroy If you want I could revert the last LSP release for the time being(until a fix for this is found)?

daveleroy commented 2 months ago

This should be fixed in 0.11.3