[analysis_server_plugin] Support parsed-only analysis for purely syntactic rules
Fixes https://github.com/dart-lang/sdk/issues/64176 Fork of https://dart-review.googlesource.com/c/sdk/+/543580 Allows analyzer plugins to skip element model resolution for libraries where all enabled rules only require parsed compilation units (declaring `bool get canUseParsedResult => true;`). 1. Implements `package`, `isInLibDir`, `isInTestDirectory`, and `isFeatureEnabled` on `RuleContextWithParsedResults` so syntactic rules have access to workspace context. 2. Updates `PluginServer` to evaluate `_canUseParsedResult` across library compilation units before resolving libraries. 3. Ensures part files resolve their enclosing library when computing parsed diagnostics on change. Change-Id: I0f9c99ffb8aea9d8921e36657a5cf3b05001cbf3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/544280 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>
S
Sam Rawlins committed
8b3563cf6c22e4fddd6816da1a4304e1be54f511
Parent: 0f19f16
Committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com <dart-scoped@luci-project-accounts.iam.gserviceaccount.com>
on 9/2/2026, 2:54:56 PM