Skip to content

Conversation

@kinto0
Copy link
Contributor

@kinto0 kinto0 commented Dec 2, 2025

Summary:
interpreter fails to update type errors when changing from a bad one to a good one

reported here #1632

Differential Revision: D87664939

@meta-cla meta-cla bot added the cla signed label Dec 2, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 2, 2025

@kinto0 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87664939.

kinto0 added a commit to kinto0/pyrefly that referenced this pull request Dec 2, 2025
Summary: interpreter fails to update type errors when changing from a bad one to a good one reported here facebook#1632 Differential Revision: D87664939
kinto0 added a commit to kinto0/pyrefly that referenced this pull request Dec 2, 2025
Summary: interpreter fails to update type errors when changing from a bad one to a good one reported here facebook#1632 Differential Revision: D87664939
kinto0 added a commit to kinto0/pyrefly that referenced this pull request Dec 2, 2025
Summary: interpreter fails to update type errors when changing from a bad one to a good one reported here facebook#1632 Differential Revision: D87664939
@kinto0 kinto0 force-pushed the export-D87664939 branch 2 times, most recently from 15bc26c to 3bc9ec3 Compare December 2, 2025 20:56
… RecheckFinished events (facebook#1730) Summary: The test_notebook_publish_diagnostics test was flaky due to a race condition during LSP initialization. When a client responded to the WorkspaceConfiguration request during initialization, workspace_configuration_response() would trigger invalidate_config_and_validate_in_memory(), which always queued a RecheckFinished event. This RecheckFinished event calls validate_in_memory_and_commit_if_possible(), publishing diagnostics for all currently open files. It seemed like the race occurred because: - If didOpen was processed BEFORE RecheckFinished: The notebook was already in open_files, so RecheckFinished published diagnostics for it → 2 publishDiagnostics (test passed) - If didOpen was processed AFTER RecheckFinished: No files were open yet, so RecheckFinished published nothing → 1 publishDiagnostics (test failed) The fix prevents RecheckFinished from being queued when there are no open files to revalidate. This makes the server behavior deterministic and eliminates the race condition. As a side benefit, this also improves performance by avoiding unnecessary revalidation work during initialization. Differential Revision: D88116232
Summary: interpreter fails to update type errors when changing from a bad one to a good one reported here facebook#1632 Differential Revision: D87664939
kinto0 added a commit to kinto0/pyrefly that referenced this pull request Dec 2, 2025
Summary: interpreter fails to update type errors when changing from a bad one to a good one reported here facebook#1632 Differential Revision: D87664939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment