[L] Change in dart/sdk[main]: analyzer: New warning for deprecated directive configurations

0 views
Skip to first unread message

Samuel Rawlins (Gerrit)

unread,
11:33 AM (9 hours ago) 11:33 AM
to Brian Wilkerson, Srujan Gaddam, Kevin Moore, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson

Samuel Rawlins added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Samuel Rawlins . resolved

Sending to Brian to review the general idea of the new warning, and the name, so that Srujan can send `// ignore` lines to the Flutter Web SDK.

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I10c6bbff86debcc6bb30a1d734a7bea56ecfe59a
Gerrit-Change-Number: 468040
Gerrit-PatchSet: 5
Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
Gerrit-CC: Kevin Moore <kev...@google.com>
Gerrit-CC: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 15:33:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
11:57 AM (9 hours ago) 11:57 AM
to Samuel Rawlins, Brian Wilkerson, Srujan Gaddam, Kevin Moore, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Samuel Rawlins

Brian Wilkerson voted and added 7 comments

Votes added by Brian Wilkerson

Code-Review+1

7 comments

File pkg/analysis_server/lib/src/services/correction/dart/replace_configuration_with_js_interop.dart
Line 17, Patchset 5 (Latest): CorrectionApplicability.singleLocation;
Brian Wilkerson . unresolved

Is there a reason to not enable this for bulk fix?

File pkg/analyzer/messages.yaml
Line 25692, Patchset 5 (Latest): deprecatedWebConfiguration:
Brian Wilkerson . resolved

The name lgtm, and I agree that this should be a warning.

Line 25702, Patchset 5 (Latest): The analyzer produces this diagnostic when a deprecated library is used in
Brian Wilkerson . unresolved

Should we list the deprecated libraries that will be flagged?

Line 25707, Patchset 5 (Latest): If the library `p`:
Brian Wilkerson . unresolved

The code blocks with uri's don't display the file name / path automatically, so we put that information into the text. This usually starts with "Given a". In this case we'll need to include all of the file names. Perhaps something like

Given a package containing a file named `a.dart`:
...
a file named `a_io.dart`:
...
and a file named `a_web.dart`:
...

Otherwise readers won't see the file names.

Line 25724, Patchset 5 (Latest): The following code produces this diagnostic:
Brian Wilkerson . unresolved

Consider adding something like "because the configuration uses the dotted identifier `dart.library.html`"

Line 25741, Patchset 5 (Latest): var c = C();
Brian Wilkerson . unresolved

Consider adding a blank line before this line.

File pkg/analyzer/test/src/diagnostics/deprecated_web_configuration_test.dart
Line 34, Patchset 5 (Latest): if (dart.library.html) 'src/hw_web.dart';
Brian Wilkerson . unresolved

Do we need to test any of the other deprecated libraries?

Open in Gerrit

Related details

Attention is currently required from:
  • Samuel Rawlins
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I10c6bbff86debcc6bb30a1d734a7bea56ecfe59a
    Gerrit-Change-Number: 468040
    Gerrit-PatchSet: 5
    Gerrit-Owner: Samuel Rawlins <sraw...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
    Gerrit-CC: Kevin Moore <kev...@google.com>
    Gerrit-CC: Srujan Gaddam <sru...@google.com>
    Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
    Gerrit-Comment-Date: Mon, 30 Mar 2026 15:56:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages