Commit Graph

56 Commits

Author SHA1 Message Date
Konstantin Shcheglov 8779d4e9a7 Breaking changes for analyzer version 14.0.0
Change-Id: I3bd6b1bbf60bb1b45f46e62ebf448f27f103f98e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-11 11:59:47 -07:00
Konstantin Shcheglov dbeb7e1e5b Prepare to publish analyzer 13.3.0, _fe_analyzer_shared 103.0.0, analysis_server_plugin 0.3.18, analyzer_plugin 0.14.12, analyzer_testing 0.3.2
Change-Id: I0a5bf96733f2908160a6ef2ee99f54ef25f11547
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2026-06-11 10:59:52 -07:00
Konstantin Shcheglov 78f9ab6cb8 Start analyzer 13.3.0-dev, analyzer_plugin 0.14.12-dev, analyzer_testing 0.3.2-dev, analysis_server_plugin 0.3.18-dev
Change-Id: I2a9e762e2f5b3fd4762ee0d0eb22296db0f3dff4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/511021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 13:03:15 -07:00
Konstantin Shcheglov e4ef831dfc Prepare to publish analyzer 13.2.0, _fe_analyzer_shared 102.0.0, analysis_server_plugin 0.3.17, analyzer_plugin 0.14.11, analyzer_testing 0.3.1
Change-Id: I534e30c37570cf5fdc194eb9668d37747823aa82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510480
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-10 10:52:25 -07:00
Konstantin Shcheglov 46bb00bfae Start analyzer 13.2.0-dev, analyzer_plugin 0.14.11-dev, analyzer_testing 0.3.1-dev, analysis_server_plugin 0.3.17-dev
Change-Id: I08c2d7d8829ebe0eba147baa52a754e71b43c145
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-06-04 12:51:41 -07:00
Konstantin Shcheglov 050afdb4ae Prepare to publish analyzer 13.1.0, _fe_analyzer_shared 101.0.0, analysis_server_plugin 0.3.16, analyzer_plugin 0.14.10, analyzer_testing 0.3.0
Change-Id: I61d4d2e2da18ed1ea2c1eaf78138a32774535be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509162
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-06-04 11:21:35 -07:00
Konstantin Shcheglov e20704c3b0 CQ. Move PackageConfigFileBuilder to analyzer_testing.
Move PackageConfigFileBuilder into the analyzer_testing public API and
deprecate the copy exposed from package:analyzer. The builder is only
used by test infrastructure, so keeping it in analyzer_testing makes the
ownership clearer and avoids exposing test-only utilities from analyzer.

Update the builder API to accept a rootFolder instead of a rootPath.
This lets callers pass the resource-provider folder directly, so the
generated rootUri is derived from the same file-system abstraction that
created the test files. This avoids accidentally passing POSIX paths
where resource provider paths are required, such as on Windows.

Update existing test utilities and callers to import the new library and
pass Folder objects. Remove the production analysis server dependency on
the builder by emitting the temporary plugin package config JSON
directly.

Change-Id: I46b14710626e0d6d5884afcdc5a05b23077acfc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499081
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-04-29 13:18:35 -07:00
Konstantin Shcheglov 84ce4ba3df Start analyzer 13.1.0-dev, analyzer_plugin 0.14.10-dev, analyzer_testing 0.2.7-dev, analysis_server_plugin 0.3.16-dev
Change-Id: If445461ac9c3fca85656c69d66fb5e99a5d2e339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-04-22 12:36:09 -07:00
Konstantin Shcheglov f2c40f98fd Prepare to publish analyzer 13.0.0, _fe_analyzer_shared 100.0.0, analysis_server_plugin 0.3.15, analyzer_plugin 0.14.9, analyzer_testing 0.2.6
Change-Id: I67692af1ed67a50b55ba1e7a5d907f85e6572040
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497342
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-04-22 11:38:06 -07:00
Konstantin Shcheglov 6cd3938741 Breaking changes for analyzer 13.0.0
https://github.com/dart-lang/sdk/issues/62799
https://github.com/dart-lang/sdk/issues/62944
https://github.com/dart-lang/sdk/issues/63002
https://github.com/dart-lang/sdk/issues/62970

Looks mostly green in google3: https://fusion2.corp.google.com/presubmit/901021300/OCL:901021300:BASE:901308428:1776439417713:37cd1695

Change-Id: I44754a48f66a0b58851d7c20fcfa61f7fb1b555a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488624
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-04-17 23:06:25 -07:00
Konstantin Shcheglov 7ecd14fb10 Start analyzer 12.2.0-dev, analyzer_plugin 0.14.9-dev, analyzer_testing 0.2.6-dev, analysis_server_plugin 0.3.15-dev
Change-Id: I426a42588163b3e3680fea80ff7965ca7d076eb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-04-08 13:06:30 -07:00
Konstantin Shcheglov 1b3b1a154f Prepare to publish analyzer 12.1.0, _fe_analyzer_shared 99.0.0, analysis_server_plugin 0.3.14, analyzer_plugin 0.14.8, analyzer_testing 0.2.5
Bug: https://github.com/dart-lang/sdk/issues/63113
Change-Id: I58a32cfd25dfdd4663aefa79ddaa64dda67d486a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/493481
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-04-08 10:54:40 -07:00
Konstantin Shcheglov 23e558876a Start analyzer 12.1.0-dev, analyzer_plugin 0.14.8-dev, analyzer_testing 0.2.5-dev, analysis_server_plugin 0.3.14-dev
Change-Id: Ib0971736635e507fbd1cc4a214ccba8beea83639
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490346
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-03-24 17:03:40 -07:00
Konstantin Shcheglov ea94b269d1 Prepare to publish analyzer 12.0.0, _fe_analyzer_shared 98.0.0, analysis_server_plugin 0.3.13, analyzer_plugin 0.14.7, analyzer_testing 0.2.4
Change-Id: Ia46a1ba04db30a15d8848e8e1586795921a33ed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488241
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-03-16 19:32:20 -07:00
Konstantin Shcheglov e9d8109258 DeCo. Support empty bodies in membered declarations
Allow enums, extensions, and mixins to use `;` as their body and
represent that form explicitly in the AST. The parser now produces
`EmptyEnumBody` or `EmptyClassBody` for the empty form.

Also replace `LibraryIdentifier` with token-based `DottedName` and store
the full token sequence for dotted names. This preserves periods and
source offsets directly in the AST, which keeps printing, selection, and
directive name handling working with the new shape. See
https://github.com/dart-lang/sdk/issues/62819

See https://github.com/dart-lang/language/issues/4645

Google3 presubmit looks green:
https://fusion2.corp.google.com/presubmit/884063020/OCL:884063020:BASE:884079610:1773618867493:b2110d76

Change-Id: I2d023cd03b6423da634c3e14742e02a61dc3b403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/486080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-03-16 08:56:11 -07:00
Konstantin Shcheglov 2e6153cdb6 Start analyzer 11.1.0-dev, analyzer_plugin 0.14.6-dev, analyzer_testing 0.2.3-dev, analysis_server_plugin 0.3.12-dev
Change-Id: Iddeffba7499ea1b1bcd607bf72ad9766a997ae74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484501
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-03-02 10:53:00 -08:00
Konstantin Shcheglov e819fffbd1 Prepare to publish analyzer 11.0.0, _fe_analyzer_shared 97.0.0, analysis_server_plugin 0.3.11, analyzer_plugin 0.14.5, analyzer_testing 0.2.2
Change-Id: Ibfa9fa0db341a9335bf5983375e15212717b6b5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484220
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-02-27 10:52:00 -08:00
Konstantin Shcheglov 19895724dd Breaking changes for analyzer version 11.0.0
Change-Id: I75c4dca69a99c0129cc8ae6934d5925382228a00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481542
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-02-24 14:36:29 -08:00
Konstantin Shcheglov 5cbe70416f Start analyzer 10.3.0-dev, analyzer_plugin 0.14.5-dev, analyzer_testing 0.2.2-dev, analysis_server_plugin 0.3.11-dev
Change-Id: I5fecb1813aebf0be764f41f270ae26a0de4dcc17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482600
Reviewed-by: Paul Berry <paulberry@google.com>
2026-02-21 10:52:57 -08:00
Konstantin Shcheglov 777b6efcd9 Prepare to publish analyzer 10.2.0, _fe_analyzer_shared 96.0.0, analysis_server_plugin 0.3.10, analyzer_plugin 0.14.4, analyzer_testing 0.2.1
Change-Id: Id5f874b59e441c81910d979d9f50e4415674179d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/482363
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-02-20 12:59:46 -08:00
Konstantin Shcheglov d3d0ec9f66 Start analyzer 10.2.0-dev, analyzer_plugin 0.14.4-dev, analyzer_testing 0.2.1-dev, analysis_server_plugin 0.3.10-dev
Change-Id: I99ed03bc272bf6c243438b41b69c78dbf5511427
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481240
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-02-17 10:53:10 -08:00
Konstantin Shcheglov fc41bfcf92 Prepare to publish analyzer 10.1.0, _fe_analyzer_shared 95.0.0, analysis_server_plugin 0.3.9, analyzer_plugin 0.14.3, analyzer_testing 0.2.0
Change-Id: Ibe306aceaf6967a978fbf7e8bad07c3475e8ca10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/481060
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-02-17 09:20:42 -08:00
Paul Berry 599f4bf94e [messages] Move string extensions into analyzer_testing.
These extensions were previously in `pkg/analyzer_utilities`, which is
not published on `pub`. That meant they could not be used from within
the `lib` directory of any package that *is* published on
`pub`. Specifically, they could not be used from within
`pkg/analyzer_testing/lib`.

In a follow-up CL, I will modify the testing logic so that after
printing `To accept the current state, expect:`, it prints diagnostic
codes in their proper camelCase format.

Change-Id: I6a6a696432d7162906b2c235ea88310dc0aa1fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480040
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-02-12 10:12:02 -08:00
Sam Rawlins 39f8aa4ba8 analyzer_testing: Remove old mock APIs and old mock sources
Change-Id: If0f40090eb689438598f092877f72525a9ba7325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477764
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-02-03 08:18:19 -08:00
Konstantin Shcheglov 98c4f54c0f Start analyzer 10.1.0-dev, analyzer_plugin 0.14.3-dev, analyzer_testing 0.1.11-dev, analysis_server_plugin 0.3.9-dev
Change-Id: I2ec7613ce0abcfa6e55f8c7837860319d9503adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/477641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2026-02-02 11:54:49 -08:00
Sam Rawlins 94a701bb0a Bump analyzer to 10.0.2, analyzer_plugin to 0.14.2, analyzer_testing to 0.1.10, and analysis_server_plugin to 0.3.8
This release is so we can publish a version of analysis_server_plugin,
and then start depending on that published version in DAS.

In addition, we get a highly requested fix out to analyzer_testing
users.

Change-Id: I694f47aeee59367c1fc066bc8f7a865406b09917
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/476620
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-01-30 09:24:57 -08:00
Sam Rawlins ca475a991d Release meta 1.18.0
analyzer package now depends on new TargetKind values in meta, so we
must bump the dependency to prevent crashes.

Change-Id: Ia639b0cd67c0dc70ae03613b6b1bfd4ad552788c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/473421
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2026-01-15 11:41:02 -08:00
Sam Rawlins 25f0d80c15 analyzer: Refactor how the mock 'dart:ui' library is discovered
Fixes https://github.com/dart-lang/sdk/issues/62234 by making the
'dart:ui' library discoverable in the same way that the real one is
discoverable: by the sky_engine _embedder.yaml file.

Coupled with this change is the motivation: the stubs are out-of-date,
with `double width` and `double height` parameters on the Preview
constructor. But this has been changed to use a `Size` object, and
`Size` is written in 'dart:ui'. So to write a test that uses `Size`, the
test now needs proper access to 'dart:ui', and we should not write
'package:ui/ui.dart' in our test cases. These changes are in
`.../lib/mock_packages/package_content/flutter/lib/src/widget_previews/widget_previews.dart`
and in `invalid_widget_preview_private_argument_test.dart`.

Change-Id: I6f608eb3e1f431ad576ba8f3572454e42a39f9f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2026-01-13 15:32:51 -08:00
Konstantin Shcheglov ef20543995 Prepare to publish analyzer 10.0.0, _fe_analyzer_shared 93.0.0, analysis_server_plugin 0.3.5, analyzer_plugin 0.14.0, analyzer_testing 0.1.8
Change-Id: I22aaf17a81027ac44d5f23b114ece789d66eed93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-01-07 11:25:23 -08:00
Sam Rawlins 2fb8ef8417 bump deps to analyzer 10
Change-Id: I181a914a4086d868a3dbed7d817f8bc04a72e2b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462560
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-11-17 12:39:49 -08:00
Sam Rawlins d4f2fec655 analyzer: Tidy and document LintCode.new and interpolated args
Deprecate the `hasPublishedDocs` parameter, as it is unused and
unnecessary. This triggers dev package versions.

Document how args are interpolated into problemMessage and correctionMessage.

A breaking change landed in analyzer_plugin, requiring a bump to
0.14.0.

Fixes https://github.com/dart-lang/sdk/issues/61921

Change-Id: I8e8f7e6af1c20ca9247cccd53e1fe2e5fc3cf083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461581
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-11-12 13:13:11 -08:00
Paul Berry 3f29cf4b7d [analyzer_testing] Propagate linter exceptions by default.
Changes the behavior of the `analysisOptionsContent` function so that
unless `propagateLinterExceptions: false` is passed to it, it creates
an analysis options file that specifies a `true` value for
`propagate-linter-exceptions`.

This ensures that when tests that use `package:analyzer_testing` are
run, exceptions that occur while processing lint rules will cause the
test to fail. Previously, such exceptions would be silently swallowed
by the analyzer, and the test would pass.

Change-Id: I6a6a69643d76cf15d801eab5c4ce6a77c7dbac96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/460220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-11-06 14:39:20 -08:00
Sam Rawlins c0bd240db8 Simplify testing analysis rule by registering in AnalysisRuleTest
This changes the API of writing an analysis rule test. Instead of
overriding the `String get analysisRule` property, and registering the
rule in `setUp` (which requires importing a private type), the
developer can now just set the `AbstractAnalysisRule rule` field in
`setUp`. This both removes the requirement to manually register the
rule, and reduces the risk of typos, by removing the String API.

Fixes https://github.com/dart-lang/sdk/issues/61793

Change-Id: Ic7753d3157e06906ba5ccbccfea67aaa3179dcc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459340
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-11-03 10:20:00 -08:00
Konstantin Shcheglov ff30536788 Prepare to publish analyzer 9.0.0, _fe_analyzer_shared 92.0.0, analysis_server_plugin 0.3.4, analyzer_plugin 0.13.11, analyzer_testing 0.1.6
Change-Id: Id5681e1cd01493d65e733c7d2fc7ece78d7193cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457162
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-10-23 13:48:19 -07:00
Konstantin Shcheglov 05bcfd2571 Breaking changes for analyzer version 9.0.0
Change-Id: I4d1b611edcf5340543b5cabf93b88a103408920b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-19 13:29:07 -07:00
Konstantin Shcheglov cb88626a6c Prepare to publish analyzer 8.4.0, _fe_analyzer_shared 91.0.0, analysis_server_plugin 0.3.3, analyzer_plugin 0.13.10, analyzer_testing 0.1.5
Change-Id: I941d0a4a1a56c741656ae94ea05dc86674c27867
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454964
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-15 09:27:16 -07:00
Konstantin Shcheglov 5be8fcc1d5 Elements. Deprecate TypeAliasElement.aliasedElement
Change-Id: I6271efcc69fc891b41f605dd4f1398e5163b579d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454662
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-13 13:42:00 -07:00
Paul Berry 533f833cf1 Reapply "[analyzer] Add experimental_member_use warning."
This reverts commit 3bdbceddc7.

This change was originally landed as commit
3923958595, however it had to be
reverted due to breaking the dart->flutter roll.

Change-Id: I6a6a6964176a276be1b9b01c74a4500488470219
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452528
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-10-13 12:23:32 -07:00
Konstantin Shcheglov c743dc9990 Prepare to publish analyzer 8.3.0, _fe_analyzer_shared 90.0.0, analysis_server_plugin 0.3.2, analyzer_plugin 0.13.9, analyzer_testing 0.1.4
Change-Id: I8b91525430d2d3995d90ca2a5c9760a7522e70f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454423
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-10-10 13:31:40 -07:00
Konstantin Shcheglov 892ba9c158 Elements. Deprecate TypeDefiningElement and TypeDefiningFragment.
Change-Id: Ic418980c83146669678d5c6d61db05d84ba86652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452903
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-02 12:29:30 -07:00
Sam Rawlins 1188d014a9 analyzer_testing: improve error message when trying to use built-in mocks
Work towards https://github.com/dart-lang/sdk/issues/61597

The analyzer_testing package's mock packages are "data" or "resource"
files which are notoriously hard to find on disk. No dart tooling I
know of can give me "the root directory of a package which is
referenced in a Dart program via "package:". Konstantin notes that
a program may be compiled ahead of time, and so the running VM itself
does not know where source files originally came from.

When users of the analyzer_testing package try to use
`addFlutterPackageDep` in a test, which attempts to locate the Dart
SDK's `pkg/` root directory, they get a StateError. This CL adds more
information and context to that error.

Change-Id: I3ae55cd580c8fa16ca86d66e6f7b655b8f9bcc42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452532
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-09-30 21:21:39 -07:00
Paul Berry 3bdbceddc7 Revert "[analyzer] Add experimental_member_use warning."
This reverts commit 3923958595.

Reason for revert: Broke dart->flutter roll https://github.com/flutter/flutter/pull/176234 due to customer testing

Original change's description:
> [analyzer] Add experimental_member_use warning.
>
> Adds the implementation of the `experimental_member_use` warning
> (whose diagnostic code was introduced in
> https://dart-review.googlesource.com/c/sdk/+/451341).
>
> There is very little implementation logic, since the bulk of the
> implementation is shared with the existing `deprecated_member_use`
> warning. Unit tests are adapted from the `deprecated_member_use` unit
> tests.
>
> Since the tests in `non_const_argument_for_const_parameter_test.dart`
> use the annotation `@mustBeConst`, which is marked `@experimental`,
> they had to be modified to expect the new warning.
>
> Change-Id: I6a6a69645bb072b29166b7617b480a890b2bb5aa
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450970
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

Change-Id: I6a6a696447ed61b133e17ffc63ca6067fdbcc1ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/452526
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-09-30 14:01:32 -07:00
Paul Berry 3923958595 [analyzer] Add experimental_member_use warning.
Adds the implementation of the `experimental_member_use` warning
(whose diagnostic code was introduced in
https://dart-review.googlesource.com/c/sdk/+/451341).

There is very little implementation logic, since the bulk of the
implementation is shared with the existing `deprecated_member_use`
warning. Unit tests are adapted from the `deprecated_member_use` unit
tests.

Since the tests in `non_const_argument_for_const_parameter_test.dart`
use the annotation `@mustBeConst`, which is marked `@experimental`,
they had to be modified to expect the new warning.

Change-Id: I6a6a69645bb072b29166b7617b480a890b2bb5aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450970
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-09-29 06:04:17 -07:00
Konstantin Shcheglov 5a98a975b7 Prepare to publish analyzer 8.2.0, _fe_analyzer_shared 89.0.0, analysis_server_plugin 0.3.0, analyzer_plugin 0.13.8, analyzer_testing 0.1.3
Change-Id: Id3e52c9b91f25a11b5b1d00a51a580f53db44033
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450744
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-09-19 13:25:42 -07:00
Sam Rawlins a2491e487b analyzer_testing: bump to language 3.9
Change-Id: Iaf20cd6e78e3950935a1f2002bd5854a9d4108bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447120
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-08-27 07:24:44 -07:00
Sam Rawlins 6f4b7e2922 analyzer: bump version constraints of dependant packages
Change-Id: I7fdc0a7b040f96a612434cb5b45995d365717022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445104
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-08-13 13:59:30 -07:00
Konstantin Shcheglov cb835a62e6 Prepare to publish analyzer 8.1.0 and _fe_analyzer_shared 87.0.0
Change-Id: I87cca5c8179b700425b42317bc9f62a826ef58fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-08-07 15:39:04 -07:00
Sam Rawlins 8546b2e4e6 analyzer_testing: Move Spelunker into this package
The Spelunker class is only used by analyzer_testing's
PubPackageResolutionTest class, and by a utility script. So I believe
the best place for this class is in analyzer_testing, for two reasons:

* Would we also move the utility script
  (`pkg/linter/tool/spelunk.dart`)? This is a script that lets you see
  a visual tree of the syntax nodes of a Dart script. It has been
  helpful to people writing lint rules, as it helps you understand how
  you need to walk up or down the tree to check conditions. Therefore,
  it will be at least as helpful to people writing analysis rules in
  analyzer plugins (the primary consumers of PubPackageResolutionTest).
  It doesn't need to live in `bin` (though that's one possibility). It
  can live in `analyzer_testing/tool`.
* Then if the utility script lives in analyzer_testing, and
  PubPackageResolutionTest lives in analyzer_testing, and these are the
  sole consumers of Spelunker, it makes sense to move it into
  analyzer_testing. It does not need to be public API; just live in the
  source code.

Change-Id: Id607091b35ab83c96b8cd73f0ece63923c934fb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444240
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-08-07 12:29:10 -07:00
Sam Rawlins 62caf711fa Bump analyzer-related package version numbers
Change-Id: Id85cfd2b4c429777e4ccd1c405df39b0795025c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443637
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-08-05 14:43:39 -07:00
Sam Rawlins 79cbfa032d analyzer_testing: First public release
Change-Id: I4575f0ac1c37389d8e360f81d603268f729d9fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441003
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-07-17 15:00:21 -07:00