Commit graph

29 commits

Author SHA1 Message Date
Konstantin Shcheglov cac96f7f8d Rename AnalysisSession.getXyz2() into getXyz().
Change-Id: Ia76aafc6a1190dcdca026097c364270389f2860a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-12 22:42:58 +00:00
Konstantin Shcheglov 5dd02f0583 Add getParsedLibrary2(), deprecate getParsedLibrary() and other parse related
Change-Id: I585fa1f01b71522dc99ba86c2b9e20da256b2d27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-19 15:52:39 +00:00
Konstantin Shcheglov a4fd3f8ba3 Remove remaining opt-outs to 2.9 from analysis_server_client.
Change-Id: I4d971ef7cbc433894b4219f3e942eef40db24a60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194010
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-05 16:10:16 +00:00
Konstantin Shcheglov 48c0eadb86 Migrate more of analysis_server_client
Added a few new methods to the listener, tests.

Change-Id: I477a17da3fd31db04c4960effee076680db62301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193895
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-02 23:36:52 +00:00
Konstantin Shcheglov 66598d3e82 Switch analysis_server_client to language 2.12, so null safety, but opt-out files.
Protocol files are generated, so should be updated together with
analysis_server protocol files.

Change-Id: I8c3c7a5aecd2f7ff70c531bb794df3aed21888b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-31 03:34:22 +00:00
Sam Rawlins 28d08923c1 analysis_server_client: Remove unnecessary imports
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ie74a933b412edd80530404b6fc613d0884f3b7b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-01-25 01:06:49 +00:00
Paul Berry 7d3bc4862d Rename pkg/analysis_tool to pkg/analyzer_utilities.
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.

Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 17:46:30 +00:00
Paul Berry 596198fb74 Share logic of package_root.dart
This CL unifies the implementations of `package_root.dart` found in
packages `analysis_server`, `analysis_server_client`, `analyzer`, and
`analyzer_plugin`.

This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.

Change-Id: I0da44edb379b8e929dd0b1c16a6989c1e9418acb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-11 18:09:18 +00:00
Brian Wilkerson 93313eb244 Enable omit_loval_variable_types in analysis_server_client
Change-Id: I21271bfc6b2b7949fcafc5f91f23f8364697bcfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 03:59:07 +00:00
Brian Wilkerson 050c7e1ac7 Sort files in analysis_server_client and analyzer_plugin and add tests to keep them that way
I didn't update the generators to generate sorted output, I just
whitelisted those files for now.

Change-Id: Ia1d233ee978691f15bce06b2556aa3371c54183f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-27 13:27:17 +00:00
Konstantin Shcheglov d1b567841b Changes to support unforked SDK.
With https://dart-review.googlesource.com/c/sdk/+/140284 most of the
tests that are failing in https://dart-review.googlesource.com/c/sdk/+/138902
are already passing. This will fix some more.

Change-Id: Iffeaff1a2b14a27b1adaf1e5344707f0faf3309e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-25 16:15:22 +00:00
Brian Wilkerson 9f0a25fd8e Enable prefer_single_quotes in analysis_server_client
Change-Id: I08211c5fd63f69978772558582459fbe5b730743
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132623
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-21 17:53:12 +00:00
Brian Wilkerson fa68a938fe Enable 4 lints in analysis_server_client
Change-Id: I654ab282326f54d40ec5a7d93076584c73c29bf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132458
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-18 22:08:30 +00:00
Brian Wilkerson 91d6e1a0a7 Enable annotate_overrides in several packages
Other than analysis_server/test/analysis/notification_overrides_test.dart,
which had a naming conflict, all of the changes were made using dartfix.

Change-Id: I911dd75dcdee00420caa48724125e86d47c8857d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-01 21:31:40 +00:00
Brian Wilkerson 77434dad99 Remove unnecessary uses of new in analysis_server_client
Change-Id: I4aeae0785f95fd66e9fac542bff6ca5ebdfe481c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 18:53:46 +00:00
danrubel e39fa29bd6 analysis_server_client API tweaks before publish
* Rename ClientListener to ServerListener
* Change ServerConnectionHandler on --> implements NotificationHandler

Change-Id: I459e4c566971d49790e12b8f1386ae80db33b38b
Reviewed-on: https://dart-review.googlesource.com/c/84560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-11-15 21:44:03 +00:00
Dan Rubel bec2daba02 Cleanup analysis_server_client API
This reduces the client functionality and renames some
of the classes and methods in the API.

Specifically:
- rename Server to Client
- rename ServerConnectionHandler to ConnectionHandler
- rename Client.start to Client.startServer
- rename Client.stop to Client.stopServer
- rename Client.kill to Client.killServer
- extract behavior from Client into Listeners
- move some of the listeners into dartfix
- make several Client fields private
Change-Id: Ie71b0ac55b489099a848764251e8369c27f6ea2d
Reviewed-on: https://dart-review.googlesource.com/c/84460
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-15 15:06:55 +00:00
danrubel 552b25084e Generate NotificationHandler dartdoc and add server tests
Change-Id: Iec977015ae89e2a703e9013fb7b6969043554afc
Reviewed-on: https://dart-review.googlesource.com/c/84080
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-10 01:16:14 +00:00
Dan Rubel c580e8cac6 Cleanup analysis_server_client package
Clients may now optionally add clientId and clientVersion information
when starting the analysis server.

In addition, this CL adds an example of how to use this package
and updates the changelog, readme and pubspec.

Change-Id: I969a13a7d8379d6289fbbbc5f8d1b66315aa6a37
Reviewed-on: https://dart-review.googlesource.com/c/82165
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-31 14:56:10 +00:00
Dan Rubel 6294171508 comment cleanup
Change-Id: I83bf6513b1acd9faedb14f1bf44e32df76dd8528
Reviewed-on: https://dart-review.googlesource.com/c/82164
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-10-31 14:25:35 +00:00
Dan Rubel 645ec2e8b5 Meld server runner in dart fix with analysis_server_client
Change-Id: I86a2e7b815ff6d3beea2d968c5e34c4e3feae2c3
Reviewed-on: https://dart-review.googlesource.com/c/82080
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-10-30 20:04:58 +00:00
Brian Wilkerson d5ccb53f01 Remove more uses of isInstanceOf
Change-Id: Ib2fc1081b793ac3dbd39889b04c6af3a8f4fac8d
Reviewed-on: https://dart-review.googlesource.com/63684
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-07-03 20:32:26 +00:00
Brian Wilkerson a6ad152315 Fix constant-related deprecation warnings in analyzer packages
Change-Id: I6e4186d2a877275db2f04881a6aa6d154d4f8693
Reviewed-on: https://dart-review.googlesource.com/55820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-05-17 21:24:38 +00:00
Brian Wilkerson 824f123a8d Clean up some hints
Change-Id: If20a9f76cfa50f7977182b1a613ed74e508fed97
Reviewed-on: https://dart-review.googlesource.com/48441
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-26 17:39:18 +00:00
Brian Wilkerson db6e377e6d Make analysis_server_client Dart 2 safe
Change-Id: Iab06cb5b779599a1a107fa6fdf832345950fa84c
Reviewed-on: https://dart-review.googlesource.com/48322
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-03-25 15:20:36 +00:00
Brian Wilkerson 602a8c2a7b Clean up usage of deprecated constants
Change-Id: I9005ba6e94529e15d8f7b21322591f4a9dabec47
Reviewed-on: https://dart-review.googlesource.com/45763
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-03-09 01:02:49 +00:00
Mike Fairhurst e2f4e6c1c9 Update mockito to be compatible with latest analyzer void changes
Change-Id: I94d8a4eae413df7a5daf5e5da0e42d1de74f43e3
Reviewed-on: https://dart-review.googlesource.com/39847
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-02-07 23:32:41 +00:00
Max Kim bd8d28dddd Test failing fix. Stdin is mocked to avoid the typing issue; not critical for this unit test.
BUG=
R=regis@google.com

Review-Url: https://codereview.chromium.org/2996703002 .
2017-08-08 19:00:37 -07:00
Max Kim 4e42dbc1f9 Add analysis_server_client without analysis_server.
BUG=
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2994723003 .
2017-08-08 14:57:43 -07:00