fix(dart): handle analyzer status notifications - #1863
Merged
opcode81 merged 1 commit intoAug 13, 2026
Conversation
jiatianzhao
force-pushed
the
fix/dart-analyzer-status-notification
branch
from
August 13, 2026 13:23
cf68c86 to
362c3f1
Compare
The Dart analysis server emits $/analyzerStatus while it analyzes a workspace. The Dart adapter did not register this server-specific notification, so the generic notification dispatcher logged every event as an unhandled-method warning even though no client action is required. Register the method with the adapter's existing no-op notification handler, keeping the global behavior for genuinely unknown notifications unchanged. Add a startup regression test that sends the notification through the production dispatcher, and document the fix in the changelog. Fixes oraios#1855
jiatianzhao
force-pushed
the
fix/dart-analyzer-status-notification
branch
from
August 13, 2026 13:24
362c3f1 to
8042aae
Compare
Contributor
|
Precondition for merging: Test this with an actual project using the Dart language server, verifying that
|
Contributor
Author
|
I verified this with the real Dart language server using Serena's pinned Dart SDK 3.7.1 on macOS arm64. I ran the same four-file Dart project with:
At the base commit ( At the PR head ( |
Contributor
|
Thanks for your contribution! |
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.
Problem
The Dart analysis server emits
$/analyzerStatusnotifications while it analyzes a workspace. Serena's Dart adapter did not register this server-specific notification, so the generic notification dispatcher logged every event as an unhandled-method warning. This creates repeated warning noise even though the notification does not require action from Serena.Cause
The Dart adapter already registers no-op handlers for other informational notifications such as
$/progressandlanguage/status, but$/analyzerStatuswas missing from that adapter-specific list. The global dispatcher therefore treated it as genuinely unknown.Fix
Register
$/analyzerStatuswith the Dart adapter's existing no-op handler. Global handling of unknown notifications is unchanged, so unexpected methods from other servers continue to produce warnings.Add a regression test that starts the Dart adapter against an in-memory LSP interface, sends
$/analyzerStatusthrough the production notification dispatcher, and verifies that the unhandled-method warning is not emitted.Verification
mainwithUnhandled method '$/analyzerStatus'and passes with this change.uv run poe test -m dart -q --tb=short: 22 passed, 2 skipped.uv run poe lint: passed.uv run poe type-check: passed.uvx --from codespell codespell CHANGELOG.md src/solidlsp/language_servers/dart_language_server.py test/solidlsp/dart/test_dart_startup.py: passed.Compatibility
No public API, configuration, dependency, or global notification behavior changes.
Fixes #1855
Disclosure
Prepared with assistance from OpenAI Codex. I reviewed the implementation and test design and ran the verification above.
Checklist
CONTRIBUTING.mdregarding the scope of PRs.CHANGELOG.md, which concisely describes the change.