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

New Release #86

Merged
merged 64 commits into from
Oct 6, 2023
Merged

New Release #86

merged 64 commits into from
Oct 6, 2023

Conversation

alcarney
Copy link
Member

@alcarney alcarney commented Oct 6, 2023

No description provided.

alcarney and others added 30 commits June 21, 2023 18:45
Originally, the assumption was that the lsp agent would host a server
that commands like `lsp-devtools record` and `lsp-devtools tui`
would connect to.

However this posed a number of issues, such as commands like `record`
missing the beginning of a session since the agent would not wait for
a connection (#29) as well as the agent not stopping once an LSP
session ended (#17)

So this commit reverses that relationship, with commands like
``record`` spinning up the server and the lsp agent creating a client
connection.

Additionally this commit
- Switches to using the base `Client` provided by a future version of
  `pygls`
- Trials using async stdin/stdout streams for the agent - a potential
  candidate someday for upstreaming into `pygls`
- Switches to using a TCP connection between client and server. (#37)
When reading `LspMessage` objects out of the database, the JSON values
will be stored as a string. By providing a `converter` we can
automatically have the fields be parsed back into JSON objects
The tui app ditches the logging.Handler setup entirely.

Instead the app now hosts an async TCP, JSON-RPC server for LSP agents
to connect to. Upon receiving messages the new centralised `Database`
object is responsible for saving the messages to the underlying
SQLite DB.
updates:
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](pre-commit/mirrors-mypy@v1.3.0...v1.4.1)
Utilising the export feature of `rich.Console`, the new
`--save-output` option can be used to save console output to either
HTML, SVG or plain text files
updates:
- [github.com/psf/black: 23.3.0 → 23.7.0](psf/black@23.3.0...23.7.0)
updates:
- [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](PyCQA/flake8@6.0.0...6.1.0)
pre-commit-ci bot and others added 29 commits August 15, 2023 20:56
updates:
- [github.com/pre-commit/mirrors-mypy: v1.4.1 → v1.5.0](pre-commit/mirrors-mypy@v1.4.1...v1.5.0)
Using `stamina` the `AgentClient` will repeatedly try to connect to a
server instance, backing off until it's trying once every 60 seconds.

Meanwhile the agent will run as normal, allowing the lsp client and
server to communicate with each other. Captured messages will be
stored up until a connection is available when they will forwarded
onto the `AgentServer` en masse.
Also
- Comment out websocket code for now
- Fix tests
- Enable coverage
updates:
- [github.com/pre-commit/mirrors-mypy: v1.5.0 → v1.5.1](pre-commit/mirrors-mypy@v1.5.0...v1.5.1)
This further simplifies the architecture by removing the
`ClientServer` object.

Also by basing most of the plugin of the base `Client` from `pygls`
this should enable non LSP, JSON-RPC servers to "just work" within the
same framework
updates:
- [github.com/psf/black: 23.7.0 → 23.9.1](psf/black@23.7.0...23.9.1)
This *should* prevent any issues with `\` path separators on Windows
This adds a proof of concept language client built on textual's
TextArea. The idea is to eventually be able to "play" with a server
while inpersonating a particular client - all while being able to
inspect the traffic sent to/from the server.

The low-level stuff is technically done? The server starts, we can
capture and display the traffic - even text sync appears to work!

It's now "just" a case of implementing a UI and adding support for
all the LSP methods!
@alcarney alcarney merged commit 8f25bc8 into release Oct 6, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant