Commit Graph

21 Commits

Author SHA1 Message Date
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
Janice Collins 7878d4437e Prepare analysis_server_client for isolate implementation.
The isolate implementation will not be included in analysis_server_client
(as that is a public package), but to allow sharing of code this
refactors Server with a base class for common code between the
implementations.  This is intended to be a non-breaking change for
the interface of analysis_server_client.

Bug: https://github.com/dart-lang/sdk/issues/41056
Change-Id: I60fc5233193527f19cbc4b937a784150a53e86b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140140
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-03-20 19:10:48 +00:00
Janice Collins ace1d9b921 Do not repeatedly analyze a full library per part when dartfixing.
Migration performance improves 10x on web_ui with this CL.
Also fixes a heisenbug in the linter code where identical uniqueNames
for LintCodes could wind up in objects that compare differently.

Bug: https://github.com/dart-lang/sdk/issues/40915
Change-Id: Iddddfd7659f4bc724ddf21ebae41750a0ee51e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-03-10 21:16:11 +00:00
Janice Collins 6b71477d6e Add a host of server debugging options to dartdev migrate.
Use --debug to switch on observatory, assert checking, and stdout/stderr
passthrough from the analysis server when running dartdev migrate.

Also adds --sdk-path and --server-path options so you have the ability
to run without the snapshot or from the non-NNBD SDK.

Change-Id: I52aba5268e1f8c2fe1d555b5dfb10e8f9133299d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138610
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-03-09 16:56:27 +00:00
Mike Fairhurst 1cb188e2a1 [nnbd_migration] Add assertions that we produced good explanations.
Change-Id: Id09c64304eb1ffce51ccfde33403dec5f8498072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137122
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-02 23:33:06 +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 d1e11f0881 Enable prefer_final_fields in three packages
Other than the updates to analysis options files, these changes are all
from dartfix.

Change-Id: I517b0601e36d5456960d81be9a429cbacf711141
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131342
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-13 05:32:14 +00:00
Brian Wilkerson fbadd6a832 Enable prefer_equal_for_default_value in several packages
Other than the changes to the code generators and analysis options files,
all of these changes were produced using dartfix.

Change-Id: I24f47b9f6b929b0b5d5e08da7ef2016f4bdc4108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-05 20:59:19 +00:00
Brian Wilkerson 7d41ae7d15 Enable unnecessary_this in several packages
Change-Id: I743066d66dbf1dff984e8f8bf5b7a472c9bc7ff7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 20:43:16 +00:00
Brian Wilkerson c547f5d933 Enable prefer_generic_function_type_aliases in most of the packages
Change-Id: I1338e731aa3f42f67fec605b20455a83fd5fce43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-27 00:43:14 +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 aa8cc30e5c Update ServerConnectionHandler to check the protocol version
... as well as reworking the example to use notification handlers and
addressing comments in https://dart-review.googlesource.com/c/sdk/+/83520

Change-Id: I27959cba79953d95d1afd851ab6a5f137dff47db
Reviewed-on: https://dart-review.googlesource.com/c/83580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-08 21:10:06 +00:00
Dan Rubel d502ba6014 Add new analysis_server_client handlers
* Make the NotificationHandler a mixin
  and move it to /lib/handlers

* Add new notification handler mixins
  - AnalysisCompleteHandler
  - ServerConnectedHandler

* Add Server.stop method

.. and address comments in
https://dart-review.googlesource.com/c/sdk/+/83180

Change-Id: I94ba657f20520ae4bb0e479a014c11509eeb9d2c
Reviewed-on: https://dart-review.googlesource.com/c/83520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-11-08 21:10:06 +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