Commit Graph

41 Commits

Author SHA1 Message Date
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
Konstantin Shcheglov 8968e5500a CQ. Enable avoid_redundant_argument_values in analysis_server/
Change-Id: If9c09f81bdbac890553573a8491ca27cb4f22dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353805
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-26 19:51:41 +00:00
Sam Rawlins f46c9afc12 [analysis_server] Add type arguments to remaining raw types
The Maps are all JSON, so they become `Map<Object?, Object?>`.

Most other types get a `Object` or `Object?` type argument, and a
few also get `dynamic`.

Change-Id: I097318defed55360b5b0d910bd2d085a121e97b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287673
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-16 20:37:57 +00:00
Oleh Prypin 88ac4a27a1 Revert "Roll the latest dart_style into the SDK."
This reverts commit bbba3c9788.

Reason for revert: latest dart_style has a few bugs and overall the changes should be discussed more

Original change's description:
> Roll the latest dart_style into the SDK.
>
> This includes support for records, patterns, sealed classes, and class
> modifiers. It also includes a fairly small number of style changes. The
> one that will be most noticeable is more compact switch statements.
>
> Change-Id: I9e89ba82d52bfa451fc54f9dd59048d72db48377
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285460
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>

Change-Id: I12fad53bdc75dda349b9362aeb84e798983bfa25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286420
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2023-03-02 13:16:36 +00:00
Robert Nystrom bbba3c9788 Roll the latest dart_style into the SDK.
This includes support for records, patterns, sealed classes, and class
modifiers. It also includes a fairly small number of style changes. The
one that will be most noticeable is more compact switch statements.

Change-Id: I9e89ba82d52bfa451fc54f9dd59048d72db48377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285460
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2023-03-01 16:08:40 +00:00
Brian Wilkerson d9482e35ce Remove some unnecessary ignore comments in analyzer packages
Change-Id: I578285132f0d3f200cb2e9069750a1391940711d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 21:33:18 +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
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
Ahmed Ashour 572f24882f [analyzer_plugin] consistent hashCode for SourceFileEdit
Fixes #49371

Change-Id: I853323df821a9b6481f6fdd190ccecba2c01aa2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250380
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-06 16:03:20 +00:00
Ahmed Ashour 466202bb34 [analyzer] remove lints ignore in generated files
Fixes #49039

Change-Id: I14e98fc5ab9c1f7b7e69f99dc1c97178b56c624d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245020
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-19 05:17:00 +00:00
Sam Rawlins 531e6e175f analyzer: Prefer string interpolations
ignore prefer_interpolation_to_compose_strings and
constant_identifier_names in generated files.

Change-Id: I963504e298f8e439734522fed9ac09911750f419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-05-04 20:45:25 +00:00
Kevin Moore b67a67e03c pkg:analy* - don't call .hashCode within Object.hash functions
Follow-up to https://github.com/dart-lang/sdk/commit/cb7c932f7bed440ead0279845c2e8e578cbdea41

Change-Id: Ie00e7759880bfc80f7b04a79979325d26607f148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214581
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-26 21:49:04 +00:00
Kevin Moore cb7c932f7b analyzer: use Object.hash functions, deprecate JenkinsSmiHash
Also bump min SDK for pkg:analyzer

Towards https://github.com/dart-lang/sdk/issues/27698

Change-Id: Ic32c839c02f18afd99fdb98eb382540aae7da88a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214126
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 19:11:24 +00:00
Konstantin Shcheglov 454d4db340 Use Object as the type for TypeUnion in analysis_server protocol generator.
Change-Id: I6772182341df26211ff245748afb983e9d1b6ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194021
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-03 19:44:24 +00:00
Konstantin Shcheglov ada329f6b1 Use fields and field constructor initializers in generated protocol.
Change-Id: Ic361cd51b18a289d3a6062cfbab844366e41cefa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193886
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-02 22:41:22 +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 9609975262 Update generators to not produce type annotations for variable declarations
Change-Id: Ia19c94b430192c606d12449011503d5ca8172feb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-25 16:31:15 +00:00
Brian Wilkerson 7070347bbb Generate single quoted strings where possible
Change-Id: I27546bbfb85f78021e515d00c2531b83b47fc71f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-20 21:52:34 +00:00
Brian Wilkerson e5705943d8 Enable prefer_conditional_assignment in several packages
Other than the changes to the code generators and the analysis options
files, the changes were all generated by dartfix.

Change-Id: I80055e3992452c5b40eed41ac79807cf5c932976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-06 05:19:19 +00:00
Brian Wilkerson e2431d1452 Update the generators to not generate unnecessary uses of "this"
Change-Id: I20d15e3b0f8046065906d96860073ad4cf353868
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129815
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 16:23:06 +00:00
Brian Wilkerson 1fe55651cb Generate end-of-line doc comments in server and plugin packages
Change-Id: I1d5517932e1c78744cfe43fc6a768a104e527091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129520
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-24 00:34:30 +00:00
Brian Wilkerson 991f529122 Remove unnecessary uses of const in analyzer-plugin
Change-Id: I200f499558e3eb473e150da606af240bd12380c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128841
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 14:29:01 +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
Devon Carew 966038ef58 [analyzer] update package:analyzer_plugin wrt some lints
Change-Id: Ic8a8989d3dbaab583f8f308d4c3ebbe7accc24cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-07-08 16:49:52 +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 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
Brian Wilkerson 579a032564 Add kythe support to plugins and format the spec files
R=jwren@google.com

Review-Url: https://codereview.chromium.org/2994103002 .
2017-08-10 11:24:40 -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 4749014b06 Remove an unused request and the associated type
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2964113003 .
2017-06-30 09:44:59 -07:00
Brian Wilkerson 24996fbfe7 Add support to pass the location of the analysis options file to plugins
R=mfairhurst@google.com

Review-Url: https://codereview.chromium.org/2947743002 .
2017-06-20 07:41:03 -07:00
Brian Wilkerson 7f5e1f260f Add a getNavigation request for plugins
R=mfairhurst@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2908523002 .
2017-05-25 10:51:24 -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 daffcecc11 Pass the sdk path to plugins
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2885993004 .
2017-05-17 08:19:49 -07:00
Brian Wilkerson e2ebf96aea Stop sharing two types between wire protocols
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2883793002 .
2017-05-15 07:57:27 -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 2cbcd96327 Allow the common spec types to be in a separate document
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2876023003 .
2017-05-12 12:24:05 -07:00
Devon Carew f486a21d8f Run dartfmt on additional generated files.
BUG=

Review-Url: https://codereview.chromium.org/2762413002 .
2017-03-21 16:23:43 -07:00
Brian Wilkerson 67b7952cf0 Update plugin spec to match server spec changes
R=pquitslund@google.com

Review-Url: https://codereview.chromium.org/2739473007 .
2017-03-08 13:41:20 -08: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