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

Resolve editor-specified config file once #15494

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Jan 15, 2025

Summary

This PR updates the logic for handling ruff.configuration setting to read and resolve the path (if specified) once.

The main motivation for this is so that we can send a request to the client to show the notification in case there are any failures when processing this setting. Without this change, the notification will be send as many times as the number of config files present in the project.

Closes: #12572

Test Plan

@dhruvmanila dhruvmanila added the server Related to the LSP server label Jan 15, 2025
@dhruvmanila dhruvmanila force-pushed the dhruv/resolve-config-once branch from 9538418 to 42fe0fc Compare January 15, 2025 12:42
Copy link
Contributor

github-actions bot commented Jan 15, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dhruvmanila dhruvmanila force-pushed the dhruv/resolve-config-once branch from 42fe0fc to a2b3c62 Compare January 15, 2025 12:55
@dhruvmanila
Copy link
Member Author

dhruvmanila commented Jan 15, 2025

Hmm, this might not be the correct solution. We'll also need to register the file watcher for the path specified in ruff.configuration and update it. And, we don't really control the file-watcher on server side as we rely on the client side so we can't be sure that this is happening which is also the case for existing config files.

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.

No feedback when an error occurs in the server in certain cases
1 participant