Commit Graph

76 Commits

Author SHA1 Message Date
Sam Rawlins b40781459a Bump analyzer_plugin to use Dart SDK 3.9.0
Change-Id: Ice7b7e978ccc666c18cbea9cb9e79673893066ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-09-02 14:07:49 -07:00
Sam Rawlins 7b42aae99f analyzer: Deprecate AnalysisResultWithErrors.errors in favor of .diagnostics
Also rename UnitAnalysisResult.errors (package-private API) to .diagnostics

Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: I0bdd7c9c19cff3bff9ee61fe4689564a7b5b727b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433581
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-06-09 15:51:01 -07:00
Sam Rawlins 126def2b08 analyzer_plugin: Use Diagnostic instead of deprecated AnalysisError
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: Icf62987d6de7cafb6f6e92076a5fcc2bd48772c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426522
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-05 11:34:00 -07:00
Jonas Finnemann Jensen d2d5de63a4 Avoid context confusion in ServerPlugin.analyzeFiles
Change-Id: Ib2500c17e4abe2a485fb8325134276f803113db4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388701
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-11-07 23:47:12 +00:00
Sam Rawlins 73443c8603 DAS: Generated protocol 'enums' can be real enums
File sizes are reduced:

```
analysis_server_client's protocol_common.dart    - 132k -> 102k (-23%)
analysis_server_client's protocol_generated.dart - 453k -> 433k (- 4%)
analysis_server's        protocol_generated.dart - 528k -> 509k (- 3%)
analyzer_plugin's        protocol_common.dart    - 139k -> 108k (-22%)
```

Change-Id: I8018f1d09e053c9d3df340ba31cdb07cbd29acf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-07 17:27:18 +00:00
pq bc34c295ae final -> var for package:analyzer_plugin
Change-Id: I0e7cd26dcb0c7de1b4f7e19b66719d5a73670ce7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345824
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-01-12 22:37:40 +00:00
pq f962700302 + flutter_style_todos
Enabled `flutter_style_todos` in analyzer packages:

* `analyzer_cli`
* `analyzer_plugin`
* `analyzer_utilities`
* `meta`


Change-Id: I5fcd76bfa5a3bdeb14d6a81b8193129c6d83d0e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335405
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-13 00:14:09 +00:00
Konstantin Shcheglov 671bb192ab Remove domain 'kythe' from DAS.
Change-Id: I66f0e538dce6eead6ba1c98b9cf0e3d747450130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264895
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 17:03:29 +00:00
Konstantin Shcheglov 2e86c1f018 Deprecate AnalysisDriver.dispose(), use dispose2() instead.
Change-Id: Icfb46bf83f3a1f5828efd76eab1014c4dee0e088
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251587
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-15 17:15:40 +00:00
Konstantin Shcheglov 9391343387 Invoke analyzeFiles() from handleAffectedFiles() only for analyzed files.
Bug: https://github.com/dart-lang/sdk/issues/49404
Change-Id: I6e80394d28a51182b622ab113a5a6376dbde13ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251442
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-14 14:54:14 +00:00
Konstantin Shcheglov 46b73c6785 Use AnalysisContextCollection for DartServerPlugin.
Not for landing, has debug logging.

There is also an example (also not for landing) of a concrete plugin.

Change-Id: Id79336205b7b6d4cd462e7cfa0fdc7bea41c2987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-06-21 18:48:44 +00:00
Konstantin Shcheglov e916841bcc Deprecations and renames for getXyz() in AnalysisDriver.
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/405055453/OCL:405055453:BASE:405057194:1634949541100:f811db8d/targets

Change-Id: I8f7f036003650611760523dd315ba89724a29b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217805
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-23 17:15:33 +00:00
Konstantin Shcheglov 79327c9f05 Make ResolvedUnitResult.content/unit non-nullable.
Change-Id: Ia79567d248f2c91290bfdf8204ea7e9f3dc85fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206668
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-14 02:33:10 +00:00
Konstantin Shcheglov 26d9fbbd04 Add getResolvedUnit2(), deprecate getResolvedUnit().
Change-Id: I0217fefb2747f2f9bd757bc041b53acaf3d1a8f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-16 21:33:54 +00:00
Konstantin Shcheglov 114d7b980a Migrate analyzer_plugin package to null safety
Bug: https://github.com/dart-lang/sdk/issues/45236
Change-Id: I01175a2b2b1eb3ce6cdf30ade794d8186c6e8ead
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191622
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 00:29:37 +00:00
Konstantin Shcheglov 0a85156103 Remove Plugin.fileContentOverlay, use OverlayResourceProvider.
Change-Id: I44688e573b87ffd1d06726b5fad3346137610ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-24 06:48:39 +00:00
Brian Wilkerson 8ee08e1128 Clean up some docs from the analyzer_plugin package
Change-Id: Iea3e8233641fb294ca1006a7b68178c439cc5e4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180780
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-26 00:03:16 +00:00
Sander Kersten 089ca8c1eb Make compute assists async and fix message
Fixes #44730.
Fixes #44731.

For "fixes" there were similar bugs that I've fixed as well.

Closes https://github.com/dart-lang/sdk/pull/44758
https://github.com/dart-lang/sdk/pull/44758

GitOrigin-RevId: e08b25ea2890fc6f796c9cc0411fe7a71eaf70b9
Change-Id: I026c325d9d362775e178a7621a17ce6ff919ed40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-23 17:58:57 +00:00
Brian Wilkerson 9c7064e96e Remove unnecessary awaits in analyzer_plugin
Change-Id: Ifc68d638d082d73495cd5184ea1270c2551d588d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180382
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-21 18:01:50 +00:00
Mike Fairhurst 334d368146 [analyzer_plugin] Remove unused dart:async imports
Change-Id: I079d5f7c1f6c36d4e76ecd41b5d22e4199c1304c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161464
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-09-02 18:09:52 +00:00
Konstantin Shcheglov a9e67d8194 Prepare to publish analyzer_plugin 0.3.0
We need this for https://dart-review.googlesource.com/c/sdk/+/154128

Change-Id: I7ce15ad1a0037e60422f412a0cb9840c29a7e4e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154129
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-11 17:05:43 +00:00
Konstantin Shcheglov 653e44485f Prepare to publish analyzer_plugin 0.2.5
R=brianwilkerson@google.com

Change-Id: Ie48ebda4951c1ea6d90e049639d3bbf8e15013be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-08 01:17:50 +00:00
Paul Berry 930cae0f13 Revert "Remove DartSdk.useSummary."
This reverts commit a2c3ecabce.

Reason for revert: Breaking change to de facto API

Original change's description:
> Remove DartSdk.useSummary.
> 
> R=​brianwilkerson@google.com
> 
> Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I9998bedb74ea940371f18ac7dce42b2f5dcc3b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149687
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-06-02 15:20:32 +00:00
Konstantin Shcheglov a2c3ecabce Remove DartSdk.useSummary.
R=brianwilkerson@google.com

Change-Id: Ifa851f4af47a973d65c528c6d07fcac0a515134b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149495
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-30 19:07:32 +00:00
Brian Wilkerson 6f15530536 Enable omit_local_variable_types in analyzer_plugin
Change-Id: I908e15b4820eab0e8375994ce3cebfac332306f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 04:06:49 +00:00
Brian Wilkerson f34a25099b Enable slash_for_doc_comments in analyzer_plugin
Change-Id: I9cafff7fcbf6c8930e3ac8ddba05061601aa8223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132452
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-18 18:17:31 +00:00
Brian Wilkerson ac8a2a657a Enable avoid_init_to_null in analyzer_plugin
All changes other than the analysis options file were made by dartfix.

Change-Id: I4c034327b39f938965c69e6eb504b8dc50267975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-12 22:54:24 +00:00
Brian Wilkerson 03c33360b7 Remove unnecessary uses of new in analyzer_plugin
Other than
- the change to enable the lint (in analysis_options.yaml) and
- updates to the generator (in tool) to stop generating 'new',
all of the changes were generated by dartfix.

Change-Id: I9d14b99ab748ef5b80f8800a802e20100eee04a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128577
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-17 20:12:05 +00:00
Brian Wilkerson 298d22f4ab remove async parse method
Change-Id: I7a2e633b43283221790fb88a12065fed3dcdabb7
Reviewed-on: https://dart-review.googlesource.com/c/82120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-30 19:26:00 +00:00
Brian Wilkerson 6a4be163eb Convert some classes to mixins
Change-Id: I619b17eec0a76bb825c7711fe63bf17223807a57
Reviewed-on: https://dart-review.googlesource.com/c/82020
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-30 14:19:36 +00:00
Brian Wilkerson da67d58110 Remove some unnecessary await expressions
Change-Id: I2a2c5625bba824270d6b9d1ca67e8476e1fbc374
Reviewed-on: https://dart-review.googlesource.com/c/80341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-16 20:29:23 +00:00
Brian Wilkerson 180b3dd301 Remove extra spaces in copyright notices in analyzer_plugin
Change-Id: Icf01fbdd84747fc92908fe5ca818124c5df992af
Reviewed-on: https://dart-review.googlesource.com/c/79640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-10-13 18:05:23 +00:00
Brian Wilkerson 0bb8cbd9cb Use void in place of Null in analyzer_plugin
Change-Id: I21a3d3646c5906256e21fb8d7d71f8433b1b39e9
Reviewed-on: https://dart-review.googlesource.com/69500
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-11 15:30:28 +00:00
Devon Carew 6fc1dd4480 analyzer_plugin no implicit-casts.
Change-Id: I12e5d4da5b61938b3eb7cc7c0e2ade6a64510b9e
Reviewed-on: https://dart-review.googlesource.com/69201
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-09 22:41:41 +00:00
Brian Wilkerson f6d2c2378a Add awaits in async methods to restore previous semantics
Change-Id: I7711cd878a31df0fb0c92572e2256c0a26923640
Reviewed-on: https://dart-review.googlesource.com/59480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-06-08 19:58:07 +00:00
Brian Wilkerson 3ee522935d Add suffix to remove the possibility of contention over byte stores in plugins
Change-Id: I448eaac6d9525432a6b154729abcaef62f0332ee
Reviewed-on: https://dart-review.googlesource.com/8260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2017-09-25 21:19:39 +00:00
Brian Wilkerson 608bf972b0 Add folding support for plugins and update the main tutorial page
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004733002 .
2017-08-28 08:05:37 -07:00
Brian Wilkerson d1a2a43d54 Add plugin support for occurrences (and fix typo)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3006703002 .
2017-08-28 08:04:42 -07:00
Brian Wilkerson dd00fc7750 Add support for highlights notification
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004613002 .
2017-08-25 09:21:36 -07:00
Brian Wilkerson efd4051c7e Add utilities to support the outline notification
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3002233002 .
2017-08-24 11:59:06 -07:00
Brian Wilkerson c6b206a2d9 Clean up after some recent code changes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3009513002 .
2017-08-24 10:01:11 -07:00
Brian Wilkerson e8010e4a44 Enhance NavigationMixin to handle notifications
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3008443002 .
2017-08-24 07:44:51 -07:00
Brian Wilkerson c53bc9f628 Unify lots of copied code in one utility method
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3008433002 .
2017-08-23 14:25:03 -07:00
Brian Wilkerson 0a50effce5 Add minimal support for sending notifications
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3003573002 .
2017-08-23 13:26:59 -07:00
Brian Wilkerson 6f81034a73 Initial Kythe support for plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2997833002 .
2017-08-14 08:24:15 -07:00
Brian Wilkerson ecc72d6be5 Initial implementation of the kythe domain
R=jwren@google.com

Review-Url: https://codereview.chromium.org/2999783002 .
2017-08-10 11:49:22 -07:00
Paul Berry e2f77056a5 Eliminate dependencies on pkg/front_end.
The API for pkg/front_end is still in flux so we want to avoid having
any packages depend directly on it (other than analyzer and
back-ends).

This CL re-exports some of the critical pieces of front_end needed by
analyzer clients so that those clients can access them via analyzer,
without having to directly depend on front_end.  It also updates
pkg/analyzer_plugin to make use of those re-exports.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2993123002 .
2017-08-07 09:46:30 -07:00
Brian Wilkerson 8bbf373a5e Remove the analysus.reanalyze request from the plugin API
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988743002 .
2017-07-25 12:10:52 -07:00
Brian Wilkerson 1e0e351406 Fix a typo in the docs
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2988683002 .
2017-07-24 09:54:23 -07:00
Brian Wilkerson 75504c2b25 Remove references to AnalysisDriver from the plugin mixin classes
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2970203002 .
2017-07-06 09:07:10 -07:00