-
Notifications
You must be signed in to change notification settings - Fork 148
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
[wip] Add Robot Framework language server #493
Conversation
Ahh, |
Woof... the vendored watchdog is going nuts on my setup... will push so we have something to look at in CI/binder, but something's definitely not right: lsp: 2021-01-24 15:14:18 UTC pid: 159268 - MainThread - EXCEPTION - robocorp_ls_core.jsonrpc.endpoint
Failed to handle request 0
Traceback (most recent call last):
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/jsonrpc/endpoint.py", line 142, in consume
self._handle_request(
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/jsonrpc/endpoint.py", line 278, in _handle_request
handler_result = handler(params)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/jsonrpc/dispatchers.py", line 38, in handler
return method(**(params or {}))
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/python_ls.py", line 261, in m_initialize
self.workspace = self._create_workspace(rootUri, workspaceFolders or [])
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/server_api/server.py", line 83, in _create_workspace
return RobotWorkspace(
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/impl/robot_workspace.py", line 18, in __init__
Workspace.__init__(self, root_uri, workspace_folders=workspace_folders)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/workspace.py", line 265, in __init__
self.add_folder(folder)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/impl/robot_workspace.py", line 24, in add_folder
self.libspec_manager.add_workspace_folder(folder.uri)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/impl/libspec_manager.py", line 544, in add_workspace_folder
folder_info.start_watch(self._observer, self._file_changes_notifier)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/impl/libspec_manager.py", line 260, in start_watch
self._watch = observer.notify_on_any_change(
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/watchdog_wrapper.py", line 223, in notify_on_any_change
self._observer.schedule(
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/api.py", line 301, in schedule
emitter.start()
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/utils/__init__.py", line 110, in start
self.on_thread_start()
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/inotify.py", line 121, in on_thread_start
self._inotify = InotifyBuffer(path, self.watch.is_recursive)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/inotify_buffer.py", line 35, in __init__
self._inotify = Inotify(path, recursive)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/inotify_c.py", line 201, in __init__
self._add_dir_watch(path, recursive, event_mask)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/inotify_c.py", line 398, in _add_dir_watch
self._add_watch(full_path, mask)
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/inotify_c.py", line 412, in _add_watch
Inotify._raise_error()
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/libs/watchdog_lib/watchdog/observers/inotify_c.py", line 424, in _raise_error
raise OSError(errno.ENOSPC, "inotify watch limit reached")
OSError: [Errno 28] inotify watch limit reached
lsp: 2021-01-24 15:14:18 UTC pid: 159268 - MainThread - EXCEPTION - robocorp_ls_core.python_ls
Error updating document: {'uri': 'file://~/jupyterlab-lsp/atest/examples/example.robot', 'version': 0} with changes: [{'text': '*** Settings ***\nLibrary SeleniumLibrary\nLibrary Builtin\n\n*** Variables ***\n${ABC} abc\n\n*** Keywords ***\nSpecial Log\n [Arguments] ${log}\n [Documentation] a special log\n Log ${log.upper()}!\n\n*** Test Cases ***\nLog Something\n Special Log ${ABC}\n\n'}]
Traceback (most recent call last):
File "~/envs/default/lib/python3.8/site-packages/robotframework_ls/vendored/robocorp_ls_core/python_ls.py", line 318, in m_text_document__did_change
self.workspace.update_document(
AttributeError: 'NoneType' object has no attribute 'update_document'
lsp: 2021-01-24 15:14:18 UTC pid: 159268 - MainThread - EXCEPTION - robocorp_ls_core.python_ls
Error updating document: {'uri': 'file://~/jupyterlab-lsp/atest/examples/example.robot', 'version': 1} with changes: [{'text': '*** Settings ***\nLibrary SeleniumLibrary\nLibrary Builtin\n\n*** Variables ***\n${ABC} abc\n\n*** Keywords ***\nSpecial Log\n [Arguments] ${log}\n [Documentation] a special log\n Log ${log.upper()}!\n\n*** Test Cases ***\nLog Something\n Special Log ${ABC}\n\n'}]
|
Looks like some changes were made upstream on rflsp, so maybe this will work now? Of note, it doesn't support a ton of features that intersect with ours... but it's something. |
Nope :( |
Worth another shot in a couple hours... |
Working on warming this back up, and getting the new, more-maintained (than |
68b90da
to
12f83c4
Compare
Gah, i've made a proper mess of things, here. I think given the increasing complexity of the py36/37 stuff, it's time to look at doing an up-front job (or committing) lockfiles with Basically, the YML in requirements/
- _base.yml # what's needed in _every_ env
- build.yml
- lint.yml
- test.yml
- test-3.6.yml
- test-3.7.yml
- test-3.8.yml
- test-3.9.yml And permute across these things to yield: .github/
- locks/
- build-3.9-linux-64.conda.lock
- lint-3.9-linux-64.conda.lock
- test-3.6-linux-64.conda.lock
# ...
- test-3.9-windows-64.conda.lock Then all of the jobs would just use their respective lockfile in The advantage to checking them in is we'd save the couple minutes up-front of doing the resolve, and have them around for local review. But the danger then becomes if we get lazy with our locks: we've actually found a number of regressions on upstream things by mostly sticking to the bleeding edge... maybe we'd just have one or two jobs that were canary-like. |
Should we just add the spec for robotframework-lsp and mark it editor support only or partial support to make it more discoverable? I know that |
Oy! I should definitely warm this back up. rflsp really supports a lot of lsp features now, and should feel really nice. If we're dropping py 3.6 in #718 , that will make this easier, so i may well re-start from a clean slate. |
Closing as superseded by #724. Thank you! |
References
robotframework-lsp
, which is generally available onpypi
andconda-forge
jupyterlab_robotmode
for robot syntax highlightingrobotkernel
as it has a number of nice bells and whistles for browser-based testingxeus-robot
is also very cool, as it works with the debugger, which we need to start consideringxeus
stuff in one go, as they are most likely to conflict with each otherxeus-python
,xeus-sql
,xeus-robot
, etc.Code changes
robotframework-lsp
in a number of places (not lint, though!)nblint
plugin or somethingrobotframework-lsp
ships 🎉 worksUser-facing changes
apt.txt
(or stuff it, and use aDockerfile
)... binder's getting a bit unwieldyBackwards-incompatible changes
Chores