Commit Graph

7419 Commits

Author SHA1 Message Date
Dmitry Zhifarsky 2b7b4dc777 [analysis_server] Fix CodeAction LSP dynamic registration config
Bug: https://github.com/dart-lang/sdk/issues/50531
Change-Id: I35a3c05a70a4ffe9ae0bbfb13874eddfaa302b25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272260
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-28 18:53:47 +00:00
Danny Tuppeny f2b4152159 [analysis_server] Include pubspec+analysis_options fixes in LSP Code Actions
Fixes https://github.com/dart-lang/sdk/issues/50306.

Change-Id: Ia9331887ee72c7ecff757557e3903ed1711ada39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-28 16:46:04 +00:00
Sam Rawlins 01fba618ed New fix: RemoveNameFromDeclarationClause
Change-Id: I5a877e9dcc54b4c42b37bca5de89ea7f94a1fe6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271563
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-23 20:24:00 +00:00
Danny Tuppeny 019fb7a214 [analysis_server] Fix auto-imports not working for plugin completions
Fixes https://github.com/Dart-Code/Dart-Code/issues/4275.

Change-Id: I8c5e80eeebfe814fb95220edcd94da3059cc1b14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-23 19:53:13 +00:00
Danny Tuppeny e5b8089c27 [analysis_server] Refactor LSP code actions handling
This is mostly* a no-op refactor. This code handler had grown quite messy and all of the quick-fixes code only ran for Dart files (and assumed it had a resolved unit) which complicates fixing https://github.com/dart-lang/sdk/issues/50306 (quick-fixes for non-Dart files).

This change splits the handling into separate classes for each source of code actions (currently just "server Dart" and "plugins" but soon there will be pubspec/analysis_options producers too), then merges each group and sorts that group by priority.

* the one minor change is a code-path that was producing CodeAction literals where the client had not advertised supported this. This is now fixed and the related test updated.

Change-Id: I8837610c64aba3f2c3dcb2f1eb0bc9bf5c43ad62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-23 19:50:58 +00:00
Sam Rawlins a030c643cb New fix: move_annotation_to_library_directive
Change-Id: Ifef0a4d5a9c81faf21a6cb39b5fb0fbb525db139
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270780
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-23 02:27:31 +00:00
Sam Rawlins f6d66b6ea7 Update fix status file
Change-Id: I9ac3d082720f9176704f1c600d96238f55778a63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-22 16:24:29 +00:00
Sam Rawlins c5729b36d5 Fix runtime errors in instrumentation log_viewer
I encountered these errors while trying the log_viewer on some recent
log files.

Change-Id: If0207659eae717e4fbba28455ceee8815671f081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270801
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-22 00:04:35 +00:00
Ahmed Ashour 208d65324a [analysis_server] fix AddMissingEnumCaseClauses with prefix
Fixes #50484

Change-Id: I1bd325d460f0e286e602e215c0cce6a86eae2a3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-21 22:29:37 +00:00
Ahmed Ashour 9bea89246a Fix grammar
Fixes #50509

TEST=ci

Change-Id: I7ca115bbe6f436e9df126afddcc08eaba79af2f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270740
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-11-21 20:07:29 +00:00
Ahmed Ashour 3556eb571e [analysis_server] RemoveDeadCode to handle forParts updaters
Fixes #43511

Change-Id: I8d717038356444c70e082aab37911791de63bd6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266389
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-21 19:59:27 +00:00
Sam Rawlins 8e743ca83c Add fix for CompileTimeErrorCode.SUPER_FORMAL_PARAMETER_TYPE_IS_NOT_SUBTYPE_OF_ASSOCIATED
Fixes https://github.com/dart-lang/sdk/issues/50524

Change-Id: I0d2a32c3c93e48979872592ba371865c695e76cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271060
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-21 19:44:02 +00:00
Sam Rawlins 6eef2c0649 Add fix for NON_FINAL_FIELD_IN_ENUM
Change-Id: I4eb8125468290af44b65343d620ee2646c2594c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-21 18:42:51 +00:00
Danny Tuppeny 699b42c8e3 [analysis_server] Support adding multiple imports for @overrides completions
Related to https://github.com/Dart-Code/Dart-Code/issues/4116.

Change-Id: I81b9e7bfbe4bbd093770925f9dcb640b72487142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270181
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-21 18:06:35 +00:00
Sam Rawlins 100f78daf6 Enforce new lint rules in pkg/analysis_server
Change-Id: I2fd938e5bc44f0798429b68524abc5718211c0ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270482
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-18 22:36:57 +00:00
Konstantin Shcheglov e65f0f43ea Resolve if-case statement, make variables available to 'when' and 'ifTrue'.
Change-Id: I1f5074753792aba6ace28f1e2ec8e970fd22fddf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270561
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-18 19:00:57 +00:00
Sam Rawlins f7520deae2 New fix for removing an unnecessary library directive
Change-Id: I4a57623d7e5b638d8fdf6ca174fdc5fb70187107
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270541
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-18 04:27:50 +00:00
pq 59adefeef4 [logViewer] support pageLength configuration
Change-Id: Ic6d7a64af16c85baac65e8729ed423c3e4b006ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270560
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-18 02:51:13 +00:00
Ahmed Ashour d88ce93390 [analysis_server] add a failing test case for AddMissingEnumLikeCaseClauses
Bug #50484

Change-Id: Ia5fe475e62eb9015abcc06a7c9a15c7c79e6bef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270105
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-17 21:30:42 +00:00
Danny Tuppeny 35d3015ed5 [analysis_server] Allow folding of whole function declarations (not only bodies)
Fixes https://github.com/Dart-Code/Dart-Code/issues/4269.

Change-Id: I137a105d119c3387a2f319a34c420380e4b97e5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270401
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-17 20:03:17 +00:00
Jens Johansen 5b68279417 [analyzer] Fix timing issue in benchmark
When I run
`out/ReleaseX64/dart-sdk/bin/dart pkg/analysis_server/benchmark/benchmarks.dart run analysis-server`
locally the process often doesn't finish because of a timing bug.
This fixes the one I'm running in to.

Change-Id: Ie94de8c4bb59211bff39ca2df1f8dd63fc53cc75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-11-17 14:46:59 +00:00
Johnni Winther 02e8bbb036 [cfe,analyzer] Share experimental flags for the parser
This adds a new generated file into _fe_analyzer_shared for the
experimental flags. This is now used by the parser when generating
messages about features not being available.

The default implementation uses whether the feature is enabled by default
or not, to emit different messages. This change will therefore ensure
that when a missing feature changes from 'experimental' to
'enabled by default', the  message reported by the parser will be
updated accordingly. Currently errors are only reported from the parser
on features that are enabled by default, so the message for experimental
features is not currently used.

The reporting is performed through the Listener, such that
implementations can override the reporting to improve the messaging.
This is done in the CFE where the message is improved to take into
account whether the language version is explicit in the parsed library.

In response to https://github.com/dart-lang/sdk/issues/46329

Change-Id: Ief812817c7eb4b1e433389f6f49d6a1f77604fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-11-17 11:32:01 +00:00
Konstantin Shcheglov c78ec3cd98 Remove the whole statement for any assignment to a SimpleIdentifier.
Stop using PromotableElement in analysis_server/.

Change-Id: If543c1e5e73112335634ecab5b275322010b0b66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-16 22:38:00 +00:00
Konstantin Shcheglov e10bfd30e3 Rename to ObjectPattern, instead of ExtractorPattern.
Change-Id: Iae1cc5037452ceb1940158567a87d90f4d30dc54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-16 21:59:27 +00:00
Danny Tuppeny 1d64cba68e [analysis_server] Fix override completions being suppressed because of import edits
Fixes https://github.com/Dart-Code/Dart-Code/issues/4116, although currently inserts the override without adding imports (imports will be added in a separate CL).

Change-Id: Ib78442c8a084928ff7da122a17d4b035b3fade8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-16 17:51:50 +00:00
Brian Wilkerson 6ef4cfe23b Revert "[analyzer] add UNNECESSARY_NAN_COMPARISON hint"
This reverts commit 254da67495.

Reason for revert: This breaks both Flutter and internal code.

Original change's description:
> [analyzer] add `UNNECESSARY_NAN_COMPARISON` hint
>
> Fixes #44649
>
> Change-Id: I3784f7222a217e5b6ca485c02e9a889964ffcc8c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269881
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com,asashour@yahoo.com

Change-Id: Ibcfaba3f1a24a81e01f94d3fe98e3d7df36250f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270081
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-16 17:19:46 +00:00
Ahmed Ashour 254da67495 [analyzer] add UNNECESSARY_NAN_COMPARISON hint
Fixes #44649

Change-Id: I3784f7222a217e5b6ca485c02e9a889964ffcc8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269881
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-16 00:04:28 +00:00
Ahmed Ashour 58ac7e15fe [analysis_server] offer AddSuperParameter fix
Fixes #50293

Change-Id: I1cb05382bae6ff68ff5f9babb078e3ba95024d31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-15 21:43:03 +00:00
Danny Tuppeny fc9581d758 [analysis_server] Use ElementLocation to properly resolve documentation in LSP completions
Fixes https://github.com/Dart-Code/Dart-Code/issues/3787.

Change-Id: Iffd83fbd96f2ff8dc136c2a3f5ec7824e7451ca2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-15 19:14:18 +00:00
Kallen Tu 0e524b949a [analyzer/cfe] Emit error when trying to use sealed and abstract modifiers on a class.
`sealed` and `abstract` modifiers are mutually exclusive. Error when a user tries to use them together on a class declaration.

Implemented in the parser since it's a common error between the analyzer and the CFE.

Change-Id: I9a8835c29ddb430ea0f005630bbdf9348f8b055c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-11-14 19:51:42 +00:00
Jens Johansen d26cf07b10 [analyzer] Complete completers when disposing
There has been reports of slow analyzer queries that ~locked up VSCode,
and I was given a (reproducable) example by @yousefi.

Turns out that, at least what I could reproduce, wasn't the analyzer
being slow, but rather the analyzer never responding to a query in
certain timing-related situations.

In the concrete example a test-script checks out another copy of the
directory opened by VSCode _inside_ the same directory (say root folder
opened by VSCode was "foo" and now it gets "foo_copy" inside it), this
causes `_destroyAnalysisContext` to be called, effectivley stopping all
in-flight queries via the stopped `AnalysisDriver`s, meaning that a
response is never given.

I can also reproduce the same thing by for instance having
`pkg/analysis_server` open in VSCode and then checking out a many
months old revision (while firering queries).

This CL is a suggestion for how to fix it: When disposing of an
`AnalysisDriver` we finish all waiting `Completer`s with an error,
this means a response is given and that VSCode stops waiting.

Change-Id: Idc04bf1d1d3f86a6d12bb77f5805064c67965209
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-11-14 09:37:37 +00:00
Ahmed Ashour 1be1780b79 [analyzer] add CAST_FROM_NULLABLE_ALWAYS_FAILS hint
Fixes #50309

Change-Id: Iaf19f46e7d3632d048a7db2e5194d59e933a69a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-11 21:12:48 +00:00
Konstantin Shcheglov 4ed6433ed7 Report when a record or object patterns have duplicate named fields.
See https://github.com/dart-lang/language/issues/2610

Change-Id: I4fe910583c4b316013a5df915b86d8590d625995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269200
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2022-11-11 03:59:35 +00:00
Sam Rawlins 207a47145f Fix overlays in completion_metrics.dart
Overlays were not being removed fully, which lead to crashes as we tried to
change the file contents with an invalid index.

Change-Id: I2c60a101b3a60e90100fbaf1970a3cada0296e41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269180
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-11 00:20:29 +00:00
pq e1ea341e63 update new lint fix status
Change-Id: I8acda986911e2ad03496acda6078515e5a1868c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268842
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-10 18:57:25 +00:00
Brian Wilkerson 76945a3b81 Prepare to collect additional analytics
Specifically, an additional initialization option and data about which
commands are later executed.

Change-Id: If71f696006527e9104d7765bdd43a913786cad97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268860
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-10 14:58:28 +00:00
pq 35699ad901 linter 1.30.0
Change-Id: I46981ffb71006aff9e7d8d68a323ae243f9c2542
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268800
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-09 23:25:29 +00:00
Ahmed Ashour f66b935649 [analyzer] Fix parameter count for not_enough_positional_arguments
Fixes #50410

Change-Id: Icb06537ae3f668bbdcf5b8bd1a0766140869c8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-09 21:55:40 +00:00
Ahmed Ashour f915ad9e87 [analysis_server] fix ReplaceWithNullAware with cascade
Fixes #50329

Change-Id: I15d667e1abf7e776b69b2a214aaf3b06653e6787
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-09 17:47:18 +00:00
Danny Tuppeny 319e8b0c9e [analysis_server] Remove relationship from Type Hierarchy "detail"
See https://github.com/Dart-Code/Dart-Code/issues/4254.

Change-Id: I66363a4f1c17c8f379ca10b1e2063f0f3fcaba5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-09 17:22:23 +00:00
Nate Bosch d6909d4740 Add a fix for implicit call tearoffs
Towards https://github.com/dart-lang/language/issues/2399

Add `AddExplicitCall` correction producer and configure it to run for
`implicit_call_tearoffs` diagnostics.

Add parenthesis for any expressions with lower precedence than `.call`.

Add tests which include patterns returning and passing an implicit tearoff.

Change-Id: I482d2571b183bd0dfdf6c77f0cf530117add9eca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256163
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-11-09 02:14:48 +00:00
Danny Tuppeny 197344ba22 [analysis_server] Pass relation kind back from search for subtypes
Change-Id: I4faf4c6194967d69df74829bdb1789e691e4b985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263902
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-09 02:13:17 +00:00
Brian Wilkerson b72effa7ef Fix the parameter type in extract method when the type is nullable and has type arguments
Fixes: 50402
Change-Id: I56a0d076519195a2ecfaa9e84c2fc7e6de3cb6d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-08 20:53:39 +00:00
Konstantin Shcheglov 4c7174c405 Use TestCode and textual dumps to check a few test cases more thoroughly.
I don't observe the reported regressions, it might have been fixed
already. So, no changes to the implementation.

Change-Id: I60a3229c52f3de32b19e51690ce91160813f3bad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-11-08 20:42:28 +00:00
Brian Wilkerson e61ac810fe Fix the windows bot
Change-Id: Id15e2a4191fc11cf145ba5a10f3970d7135b0863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268520
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-08 17:50:40 +00:00
Brian Wilkerson eb19a96c98 Add documentation about server
This is very incomplete, but I started working on it several months ago
and haven't had time to finish it, so I want to get it checked in before
I loose it and so that someone else can take over if they want to.

Change-Id: I76ff9248a318b59b8d25858b944ac0726a48b3cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268100
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-08 05:02:58 +00:00
Brian Wilkerson cc95a4317d Handle import changes in move to file refactoring
This also renames 'result' to 'unitResult' to be consistent with the
added 'libraryResult'.

Change-Id: If39cb86561163c5cee1e7397ee848f99cc0d4436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268082
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-07 22:50:17 +00:00
pq ca52c30092 linter 1.29.0
Downstream fixes:

* https://github.com/flutter/flutter/pull/113794
* https://github.com/flutter/plugins/pull/6669
* https://github.com/flutter/engine/pull/37321
* https://github.com/dart-lang/linter/pull/3775
* https://github.com/dart-lang/linter/pull/3776

* cl/482614222
* cl/482654980
* cl/482744309
* cl/485129394
* cl/485139323
* ...

Upstream:

* https://github.com/dart-lang/sdk/issues/50263

Change-Id: I259cb0c28464b1e513d9a1931b7c680a2a04a0a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264961
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-07 22:02:42 +00:00
Brian Wilkerson 289aa509cd Add a new warning when a colon is used as the separator for a default value
This also installs the existing fix for the new hint.

Change-Id: I32c4f3f50d1dfce4e2e37554cca7b81a84ca74d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254467
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-07 21:20:27 +00:00
Samuel Rawlins 813ca7faf6 Revert "[analyzer][meta] Refactor TargetKind to be a class, add a value in TargetKind to represent type parameter"
This reverts commit 82143e6c95.

Reason for revert: This commit appears to have negatively affected the analyze benchmark:

* https://golem.corp.goog/Revision?repository=flutter-analyze&team=dartanalyzer&revision=114193

We need to revert and analyze it.

Original change's description:
> [analyzer][meta] Refactor TargetKind to be a class, add a value in TargetKind to represent type parameter
>
> Bug: https://github.com/dart-lang/sdk/issues/49796
> Change-Id: Ide144ceb57bae94a71b9d1a7ec841d03363fc121
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258200
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

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

Bug: https://github.com/dart-lang/sdk/issues/49796
Change-Id: I6ec04ffe8d85c417d138626ffa4f1a7ac7dafe2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-07 20:17:09 +00:00