Danny Tuppeny
916272331b
[analysis_server] Remove the singleton uriConverter and pass explicitly to all toJson/fromJson methods
...
This avoids accidentally using the converter when talking to plugins, (at least for now) URIs are never expected, and file paths should always be used regardless of which mode the server is in.
This unfortunately touches a _lot_ of code, so I've pushed in many separate patch sets to Gerrit.
Fixes https://github.com/Dart-Code/Dart-Code/issues/5156
Change-Id: I312c3e2cbc35a05a078aaa0138aec7288b3c7dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373745
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-07-02 14:15:11 +00:00
Danny Tuppeny
8d936d38fc
[analysis_server]/[analyzer_plugin] Make all toJson/fromJson methods go through a central converstion for Path<->URI Strings
...
This change shouldn't change any current behaviour, but means all "FilePath" types in the legacy protocol spec will go through a (currently no-op) conversion. The server will be able to replace this conversion based on client capabilities in a future CL.
Because a lot of the generated classes are in analyzer_plugin, this also moves the ClientUriConverter class there.
`pkg\analysis_server\test\src\utilities\json_test.dart` contains tests that the toJson/fromJson methods go through the converter recursively (inc. map keys/values/etc.).
Change-Id: If5aec884070128eea594540fd25a9017ada86079
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349060
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-01-30 16:58:25 +00:00
Danny Tuppeny
a7baf9309f
[analysis_server] Ensure plugin protocol classes only use types valid for Isolate.send()
...
Fixes https://github.com/dart-lang/sdk/issues/50594 .
Change-Id: I5550239dbce4a1ed7fbd844dd53642989289c899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-12-01 16:57:56 +00:00
Devon Carew
9282573e2c
[analyzer] use package:lints for pkg/analysis_server_client, pkg/analyzer_plugin
...
Change-Id: I97d30af3930c3f65532d77dee06de57ce5f5fc20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250766
Commit-Queue: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2022-07-06 19:54:00 +00:00
Danny Tuppeny
f5bd632abe
[analysis_server] Ensure imports are always added before other code being inserted in DartFileEditBuilder
...
Change-Id: I390f24ac10f7f061e79c9bfed616e9bcc908d240
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234604
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2022-03-02 16:37:26 +00:00
Siva Annamalai
8b14aba413
Revert "Reland Support overlapping deletions in quick fixes"
...
This reverts commit c1d4af3049 .
Reason for revert: Broke Flutter, see https://github.com/flutter/flutter/issues/93206 for more details.
Original change's description:
> Reland Support overlapping deletions in quick fixes
>
> This relands both
> - https://dart-review.googlesource.com/c/sdk/+/217280 , and
> - https://dart-review.googlesource.com/c/sdk/+/217287
>
> Change-Id: Icd32df8e5bdc64514e4383f2e5625c0b093f862c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219285
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I282a7ea79777ca257333bb3c4b97d780695df902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219820
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2021-11-09 18:05:03 +00:00
Brian Wilkerson
c1d4af3049
Reland Support overlapping deletions in quick fixes
...
This relands both
- https://dart-review.googlesource.com/c/sdk/+/217280 , and
- https://dart-review.googlesource.com/c/sdk/+/217287
Change-Id: Icd32df8e5bdc64514e4383f2e5625c0b093f862c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219285
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-11-05 14:20:09 +00:00
Devon Carew
e20ffbb3ce
Revert "Support overlapping deletions in quick fixes"
...
This reverts commit ff34b81174 .
Reason for revert: This causes a failing test when trying to roll the engine into flutter/flutter. See https://github.com/flutter/flutter/issues/92181 for more context.
Original change's description:
> Support overlapping deletions in quick fixes
>
> I believe that the tests cover the added behavior (and some existing
> behavior), but they aren't complete. I'll add more tests over time, but
> for now the test coverage is strictly better than it used to be.
>
> Change-Id: I8dd228cb2b3c477c28e6d20c6da4a549a30d1afb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217280
> Reviewed-by: Phil Quitslund <pquitslund@google.com >
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ib50418544a2fd30c255ffc118b42c45aded3ae1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217760
Reviewed-by: Devon Carew <devoncarew@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Devon Carew <devoncarew@google.com >
2021-10-22 00:12:46 +00:00
Brian Wilkerson
ff34b81174
Support overlapping deletions in quick fixes
...
I believe that the tests cover the added behavior (and some existing
behavior), but they aren't complete. I'll add more tests over time, but
for now the test coverage is strictly better than it used to be.
Change-Id: I8dd228cb2b3c477c28e6d20c6da4a549a30d1afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217280
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-10-19 18:36:23 +00:00
Konstantin Shcheglov
c2d660d161
Migrate analysis_server and analysis_server_client protocol.
...
Change-Id: Ie0912627733f0481de0d3239647a4978e5327f12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2021-04-02 06:46:41 +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
Brian Wilkerson
0d222cc712
Throw an exception when an attempt is made to produce conflicting edits.
...
Change-Id: I826cd1771a61685f76314b3ec0125cfc0364b700
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170800
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-11-10 15:56:06 +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
491201aae6
Enable use_function_type_syntax_for_parameters in analyzer_plugin
...
Change-Id: I78e70d652a1f4c8539767d65beb9a08882f78e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132455
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2020-01-18 20:12:33 +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
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
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
Konstantin Shcheglov
ad6b1ebbd6
Support for 'double' fields in protocol.
...
R=brianwilkerson@google.com
Change-Id: If8dacd4578e01380f4d9e4ce1f809b9485bffc7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-07-09 18:09:47 +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
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
Paul Berry
73abd61304
Re-land "Clean up the use of deprecated API in the analyzer_plugin package".
...
int.tryParse is now available to internal Google users, so it is safe
to land this change now.
This reverts commit 115850ca1d .
Original commit 86ba29265a .
Change-Id: I92c3d19533d3108c06910f21070266953c3a065b
Reviewed-on: https://dart-review.googlesource.com/53244
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-05-01 21:08:04 +00:00
Paul Berry
115850ca1d
Revert "Clean up the use of deprecated API in the analyzer_plugin package"
...
This reverts commit 86ba29265a .
The replacement API (int.tryParse) has only just been introduced and
is not yet avaiable to internal Google users. I plan to un-do the
commit in about a week once the internal SDK has been updated.
Change-Id: Ic9206231861400d42f4814e4a56bde57ba8705a5
Reviewed-on: https://dart-review.googlesource.com/52822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2018-04-26 18:48:43 +00:00
Brian Wilkerson
86ba29265a
Clean up the use of deprecated API in the analyzer_plugin package
...
Change-Id: If63afeea8042814fd87a109aa40a6ed14ea7ee59
Reviewed-on: https://dart-review.googlesource.com/51102
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2018-04-13 18:32:19 +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
Konstantin Shcheglov
455984bbf9
Fix fuzzy arrow warnings in analyzer and analysis_server.
...
There is one warning which I'd like to fix in a separate CL.
The rest is because of package:test predicate().
I think Leaf fixed it in https://github.com/dart-lang/matcher/commit/3625f13698346576da0f5baf44e95abc9c56fb49
R=brianwilkerson@google.com
Bug:
Change-Id: I060f7ced55dbcc460185916251c47ebbd5c838d3
Reviewed-on: https://dart-review.googlesource.com/3404
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2017-09-06 00:26:18 +00:00
Brian Wilkerson
6f4420562c
Clean up some code in plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2967683002 .
2017-06-30 10:39:20 -07:00
Brian Wilkerson
7e11a13cf5
Add requestTime to responses
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2890163004 .
2017-05-18 10:32:47 -07:00
Brian Wilkerson
4c487c806b
Minor cleanup of error reporting in plugins
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2887453004 .
2017-05-15 16:48:23 -07:00
Brian Wilkerson
3085734ef6
Generate common types into a separate library
...
R=danrubel@google.com
Review-Url: https://codereview.chromium.org/2880443006 .
2017-05-13 08:12:14 -07:00
Brian Wilkerson
6ca3a29f2f
Rename generated file
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2686933002 .
2017-02-08 13:26:02 -08:00
Brian Wilkerson
f70f023261
Add an interface for request parameters
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2679093004 .
2017-02-08 07:44:09 -08:00
Brian Wilkerson
82d0383566
Revert "Add an interface for request parameters"
...
Review-Url: https://codereview.chromium.org/2683583004 .
2017-02-07 13:34:58 -08:00
Brian Wilkerson
41685ccf9a
Add an interface for request parameters
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2680053002 .
2017-02-07 12:54:02 -08:00
Brian Wilkerson
95c777fe7e
Add the generator and the generated files
...
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2664213003 .
2017-01-31 12:36:17 -08:00