-
Notifications
You must be signed in to change notification settings - Fork 196
Use asyncio #2880
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
Draft
rwols
wants to merge
106
commits into
main
Choose a base branch
from
feat/asyncio
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Use asyncio #2880
Changes from 105 commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
699dad3
Test both TCP modes
rwols 908c849
Use enum for 'Mode' in server.py
rwols b4f0420
Make init_options optional
rwols 76f3c3f
WIP add asyncio to transports
rwols 45d7ea6
Test both TCP modes
rwols e8fae30
Use enum for 'Mode' in server.py
rwols c511cec
Make init_options optional
rwols 7438d4a
Use StrEnum
rwols 6a104b0
Merge branch 'chore/add-tests' into feat/asyncio
rwols d59bb1c
More work on adding asyncio
rwols c0bea09
Merge branch 'main' into feat/asyncio
rwols c1fc59c
More work towards asyncio
rwols e35b611
Remove accidental merge conflict changes
rwols 6cad098
Remove code in server.py, I really screwed up the merge but will reba…
rwols 1597782
refactor Promise.__await__
rwols cc642f4
Add more comments to _SetTimeoutAsyncExecutor
rwols cea0e99
Rename Session._invoke_views -> Session._invoke_views_async
rwols 3d30ad4
More work towards asyncio
rwols 472705b
debugging sublime_aio.ViewEventListener
rwols ea34714
Merge branch 'main' into feat/asyncio
rwols 069ed50
Fix calls
rwols 776749a
More fix calls
rwols 0227877
More work. Some diagnostics show intermittently. Request logic is not…
rwols 2649a6f
Tweaks to pull diagnostics handling
rwols 54af917
Restore method names
rwols 1a4589c
Forgot import
rwols 900f721
Restore more method names
rwols 35621cf
ResponseException is not needed, we already have Error
rwols dbf4d7d
Merge branch 'main' into feat/asyncio
rwols f3b2f84
More rename reverts
rwols a9c1692
Add more tracing for understanding why requests are not resolving
rwols 7004df5
Start fixing up 'goto' functionality
rwols a876949
Fix:
rwols d27aa93
debugging
rwols 341ff99
We have something working
rwols 4ed4e3f
Start fixing diagnostic errors because diagnostics work
rwols 7aba65e
Remove trace() calls
rwols e3ccba2
Remove trace() calls
rwols c2c2a8c
Remove trace() calls
rwols af561a8
Fixups
rwols 7260c90
Remove trace() calls and fixup type hints
rwols a60ddd2
Reintroduce request_code_actions_async for SessionBuffer
rwols 23210e3
Consolidate sublime_aio & asyncio functions/classes in plugin/core/ai…
rwols 73ed644
get_session_buffer_for_uri -> get_session_buffer_for_uri_async
rwols 6d6e772
Session.session_buffers -> Session.session_buffers_async
rwols a84f3dd
_invoke_views_async -> _invoke_views
rwols f7702c2
Fix notifications being logged twice
rwols bb51929
Fix LspCheckApplicableCommand... I think
rwols 7d58862
Fix errors in WindowManager.start, and allow async version of LspPlug…
rwols e2119a1
Print exceptions from coroutines started from `run_coroutine_threadsafe`
rwols ce27231
Ensure plugin_unloaded works as expected
rwols a4aba53
Merge branch 'main' into feat/asyncio
rwols c215234
Fixup incorrect (old) usage of Session.send_request_async
rwols ae081e3
Remove trace() calls from sessions.py
rwols e4d3324
Merge branch 'main' into feat/asyncio
rwols 6e5ca85
Fix type errors in sessions.py
rwols 4866feb
Review all sublime.set_timeout_async call sites
rwols 73a658a
Merge branch 'main' into feat/asyncio
rwols 8a6de63
asyncio.Future, async functions, and Promises are all just Awaitables
rwols fcb8717
Fix process args
rwols 8997d51
Fix most type errors, except for tooling.py
rwols 5943571
Fix: document link was requested before didOpen
rwols 7485b90
Rename Files: open files sequentially, as it as before
rwols edd3ccd
apply_text_edits: wait at least one UI frame
rwols 91af0e0
LspPlugin.prefer_async_on_pre_start -> LspPlugin.use_asyncio
rwols da1fc1d
Invoke LspPlugin.on_initialize after the `initialized` notification
rwols 34697be
Update tooling.py for asyncio
rwols aa37898
Remove unused imports
rwols 9335c7d
Fix 'TCP client' mode
rwols afde9fb
Compatibility with python 3.8
rwols 0795ee4
Fix missing import for type checking
rwols 4659e8d
Add stubs/sublime_aio.pyi
rwols 76aeba1
Fix formatting
rwols 66bd43a
Fix all remaining lint errors
rwols a143bdf
Fix interface method (why isn't this reported as an error by either p…
rwols 69fd44d
Fixup interface method of `Manager` (why isn't this reported by eithe…
rwols c2a9e30
Fixup wm.handle_show_message: it's not async
rwols 8835214
Add @override to all methods in WindowManager that implement an inter…
rwols 668846c
Turn off @deprecation warnings
rwols c6a89b1
Fix lint warnings
rwols 9d8c1b3
The return type of the `Window.handle_show_message` interface method …
rwols d271624
Fix reference to task object
rwols 68b8945
Add function: exceptions_log
rwols a3c88ec
Catch possible exception when draining the stream writer
rwols 3915ca6
Add functions aclosing, gather_and_flatten_exceptions, TaskContainer.…
rwols 82973a5
Fix for python 3.8 runtime regarding opening files lock
rwols 1ae40fe
Fixes for python 3.8 runtime, better CancellableInflightStreamingRequ…
rwols 45bbb05
Fix LSP: Rename
rwols 998ac1c
Comment out the debug print in the tranports.py because I'm feeling c…
rwols 9c761d1
Merge branch 'main' into feat/asyncio
rwols 056359b
LspPlugin.use_asyncio() -> LspPlugin.use_asyncio
rwols aca3b34
Fixup incorrect merge resolution in api.py
rwols 1a6448b
I don't know how this got here.
rwols dd2b791
Odds and ends in sessions.py
rwols ff9cfd7
Odds and ends: make `@requires_session` compatible with coroutine fun…
rwols 5e3af9c
WIP refactor tests
rwols d91eeda
Convert unit/integration tests to asyncio
rwols 8676dc4
Fix bugs revealed by tests
rwols c6efba4
Merge branch 'main' into feat/asyncio
rwols 2c2e7b3
Merge branch 'main' into feat/asyncio
rwols 119fa99
Add runtime check for accidental coroutine continuations
rwols 9e35cc4
In the process of fixing bugs due to tests revealing bugs
rwols 8c83c96
Re-introduce classSetUp and classTearDown
rwols 691d8ea
Fixes for macOS
rwols 0aa553b
Merge branch 'main' into feat/asyncio
rwols e9d65dd
Fixes after merge
rwols File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| "bracex", | ||
| "mdpopups", | ||
| "orjson", | ||
| "sublime_aio", | ||
| "typing_extensions", | ||
| "wcmatch" | ||
| ] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of those additions can be removed (debug unused, the rest duplicated)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW. There are still repeated imports in in here and in TYPE_CHECKING section.
Would be nice if ruff reported those.