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

Use $/logTrace for server trace logs in Zed and VS Code #12564

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

osiewicz
Copy link
Contributor

Summary

This pull request adds support for logging via $/logTrace RPC messages. It also enables that code path for when a client is Zed editor (as there's no way for us to generically tell whether a client prefers $/logTrace over stderr.

Related to: #12523
/cc @dhruvmanila

Test Plan

I've built Ruff from this branch and tested it manually with Zed.

Copy link
Contributor

github-actions bot commented Jul 29, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser requested a review from dhruvmanila July 29, 2024 17:15
crates/ruff_server/src/trace.rs Outdated Show resolved Hide resolved
crates/ruff_server/src/trace.rs Outdated Show resolved Hide resolved
@dhruvmanila dhruvmanila added the server Related to the LSP server label Jul 30, 2024
@dhruvmanila
Copy link
Member

I pushed both the changes and verified in VS Code:

2024-07-30 08:12:09.990 [info] [Trace - 8:12:09 AM]    0.021675875s  INFO ruff:main ruff_server::server: Configuration file watcher successfully registered

@dhruvmanila dhruvmanila changed the title ruff_server: Add support for LogTrace output Use $/logTrace for server trace logs in Zed and VS Code Jul 30, 2024
@dhruvmanila dhruvmanila merged commit fb9f566 into astral-sh:main Jul 30, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server Related to the LSP server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants