Fix automatic configuration reloading for text and notebook documents#11492
Merged
snowsignal merged 2 commits intomainfrom May 22, 2024
Merged
Fix automatic configuration reloading for text and notebook documents#11492snowsignal merged 2 commits intomainfrom
snowsignal merged 2 commits intomainfrom
Conversation
…notebooks (and possibly text documents) when configuration changes
Contributor
|
dhruvmanila
requested changes
May 22, 2024
Member
dhruvmanila
left a comment
There was a problem hiding this comment.
Can you update the test plan to include a video showcasing this fix? I think that would helpful to quickly review this.
dhruvmanila
approved these changes
May 22, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Recent changes made in the Jupyter Notebook feature PR caused automatic configuration reloading to stop working. This was because we would check for paths to reload using the changed path, when we should have been using the parent path of the changed path (to get the directory it was changed in).
Additionally, this PR fixes an issue where
ruff.tomland.ruff.tomlfiles were not being automatically reloaded.Finally, this PR improves configuration reloading by actively publishing diagnostics for notebook documents (which won't be affected by the workspace refresh since they don't use pull diagnostics). It will also publish diagnostics for text documents if pull diagnostics aren't supported.
Test Plan
To test this, open an existing configuration file in a codebase, and make modifications that will affect one or more open Python / Jupyter Notebook files. You should observe that the diagnostics for both kinds of files update automatically when the file changes are saved.
Here's a test video showing what a successful test should look like:
Screen.Recording.2024-05-22.at.11.13.18.AM.mov