Skip to content

Plugin fixes and assists do not work inside part of files #62075

@vowxzero

Description

@vowxzero

Analyzer plugins can report diagnostics in part of files, but their quick-fixes and assists never appear there.
The same plugin fixes/assists work normally in the main library file.

This makes plugin behavior inconsistent with analyzer built-in diagnostics, which work in both library and part files.

Reproduction

test_part.dart

part "test_part_of.dart";

void testAwait() async {
  await Future.delayed(Duration(seconds: 1)); // works
  await Future.delayed(Duration(seconds: 1)); // works
  await Future.delayed(Duration(seconds: 1)); // works

  final s1 = '123'; // works
  final s2 = '456'; // works
  final se = '789'; // works
}

test_part_of.dart

part of "test_part.dart";

void testAwait2() async {
  await Future.delayed(Duration(seconds: 1)); // not working
  await Future.delayed(Duration(seconds: 1)); // not working
  await Future.delayed(Duration(seconds: 1)); // not working

  final s1 = '123'; // works
  final s2 = '456'; // works
  final se = '789'; // works
}

Behavior

File Plugin Diagnostic Plugin Fix Plugin Assist
test_part.dart ✓ shown ✓ works ✓ works
test_part_of.dart ✓ shown ✗ missing ✗ missing

Diagnostics appear in both files, but only the main file receives fixes and assists.
The part file never offers any plugin-provided fix or assist.

Dart-SDK

  • Dart 3.10.1 (stable) (Tue Nov 18 11:02:31 2025 -0800) on "macos_arm64"
  • on macos / Version 26.0.1 (Build 25A362)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-plugintype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions