Commit graph

6281 commits

Author SHA1 Message Date
Ahmed Ashour f4b6fa85ea Add a quick fix to return_of_invalid_type
Bug: 46785
Change-Id: Ided0ebd07935289b9b7fdfaaf5a38a992646c9d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 23:56:07 +00:00
Ahmed Ashour 5502e51627 CHANGE_TYPE_ANNOTATION to handle unreferenceable type
Fixes #46971

Change-Id: Id0f1a2ebd79b1459c4d518c0cd7f42545c584159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 23:53:37 +00:00
Brian Wilkerson 804109b3c6 Add documentation to completion metrics and clean up a bit of code
Change-Id: I612b5f5953bc0f8d94ad9976e55590097389c62e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210740
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 18:26:57 +00:00
Brian Wilkerson d6f4640c0d Make the set of fixes for lints extensible
Change-Id: I70ba8737f91aa2d3728ae67d656de26d3619579e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-23 18:19:27 +00:00
Ahmed Ashour fc9ead5e9d Fix grammar
Fixes #46961

Change-Id: Ic4534e7e27a0ecee681992cb00d92f0d290a7054
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210729
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-22 16:33:56 +00:00
Ahmed Ashour 86898c2ee6 DartEditBuilder to have canWriteType()
Bug: 46911
Change-Id: Icf8cdb3af6f2c34fe2eff75f1aeb1dac4aa8aac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-21 18:51:36 +00:00
Konstantin Shcheglov 643d68793a Remove WithNonFunctionTypeAliasesMixin from analysis_server/.
Change-Id: I3b25bf726d977984552ab361baf11eed28cafd7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210651
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 22:08:24 +00:00
Konstantin Shcheglov 16e4709922 Support for navigation in macro with LSP.
Change-Id: I6c1e35f944a7e551882745e74c9570086bc53b56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-18 15:31:34 +00:00
Konstantin Shcheglov 892b902d11 Improve macro code formatting.
Change-Id: I3c9f1ddaf6b5562a10b767c2f5d7297a5ed655e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-17 20:23:42 +00:00
Konstantin Shcheglov fd2a3cdc3a Support navigation to macro-generated elements.
We use previously added `CompilationUnitElementImpl.macroGeneratedContent`
to access the current combined content.

In order to make this work with current IntelliJ plugin, without
adding new protocols, we store the generated code into a new file,
and locations for macro-generated elements are in this file.

Locations for elements that are not macro-generated are still
in the source file.

We use `ElementLocationProvider` to separate writing to the file
system, and do this only in DAS.

Change-Id: Ib156c67b0bf1f3474eb06584e76aa532abd597d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-17 16:14:02 +00:00
Ahmed Ashour c9d954efe7 SPLIT_VARIABLE_DECLARATION assist to handle unreferenceable type
Bug: 46910
Change-Id: I92c5e4afb25a75e1c1c28fb6b52c9bb02ca81eb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210127
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-17 04:40:52 +00:00
Konstantin Shcheglov 771cbb5328 Issue 46839. Remove UNCHECKED_USE_OF_NULLABLE_VALUE.
Bug: https://github.com/dart-lang/sdk/issues/46839
Change-Id: If214aab6163cd0b88a37bc04952a0cddc2bc5319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-16 16:29:14 +00:00
Ahmed Ashour eae58445e9 Fix typo in test comment
Bug: 46898
Change-Id: I5a62a055fc24af5d55fd163a1783550e11c7ad7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210001
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-08-13 08:39:41 +00:00
Konstantin Shcheglov 7ad9feb2d6 Issue 46472. Don't resolve to static Object members via dynamic.
For instance members we do this because this is the best that we
know about the result, and any successful override will be more
specific. But static members never can be invoked this way. So, we
don't do recovery for recovery.

Bug: https://github.com/dart-lang/sdk/issues/46472
Change-Id: Ifbd274011e159c3c8ae35d343603c02bb7599d8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-08-10 12:53:23 +00:00
pq 11822117c0 fix for avoid_null_checks_in_equality_operators
Fixes https://github.com/dart-lang/sdk/issues/45919

(The bulk fix test is not awesome but the lint doesn't fire multiply in one `==` so overlaps are infeasible.)

Change-Id: I6fec933f0ba62e794c1b71a6ccb255ed92c4887b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209661
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-08-09 23:21:29 +00:00
Brian Wilkerson 7d1f26ff09 Deprioritize the fix to add a null check
I missed this as part of my previous CL.

Change-Id: I07f2d6a4e0b60433afb39ee1b0a4819147a494aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209380
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-06 20:05:48 +00:00
Brian Wilkerson 4200f6d915 Enhance the replace_with_null_aware fix and apply it in more places
Change-Id: I80945b4814cca0eaeca2129e5365c0d7526a8247
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-06 17:03:35 +00:00
Danny Tuppeny b8b041ffb4 [analysis_server] Don't treat '// ignore:' comments as library-level when sorting organizing imports
Change-Id: I3c1fe45401bda9cd15c4c78d238c05792e1d3362
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-05 17:50:51 +00:00
Paul Berry ddfc60a41e Add a LibraryElement.accessibleExtensions getter.
This saves the ExtensionMemberResolver from having to access the
current scope in order to find out what extensions are available.
This will help prepare for a follow-up CL in which I separate the
"scope lookup" and "type analysis" phases of resolution.

As a side benefit, the analysis server no longer needs to go through
`package:analyzer/src` in order to include extensions in completion
results.

Change-Id: I6098eae219b0f7ef52b7c68f1d64c149d9e66823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208922
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-08-05 17:44:42 +00:00
Danny Tuppeny 0de7e86c2a [analysis_server] User outer-most matching node in getNavigation to fix constructor navigation
Fixes https://github.com/dart-lang/sdk/issues/46725.

Change-Id: Ib4f3ec5fe776ad694a7ce7019591a73aab2c4257
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208647
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-05 15:59:50 +00:00
Danny Tuppeny 55b93198e3 [analysis_server] Never move language version tokens when sorting imports
Fixes https://github.com/dart-lang/sdk/issues/46404.

Change-Id: I2718cd13f2114fcc59fe86aa27b20ad90a29af33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-05 15:58:19 +00:00
Konstantin Shcheglov 6f917d00af Rebuild context on bazel BUILD file change.
Bug: https://buganizer.corp.google.com/issues/195398835
Change-Id: I80a659a8ab6a3162703e6442970438af9b19be60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209020
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Michal Terepeta <michalt@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-05 12:47:40 +00:00
Brian Wilkerson 7bc076c9e0 Fix a bug in data-driven fixes that caused imports to be added multiple times
Change-Id: Idd0dadcaed4b59173573475d5b115e0fc6228184
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-04 16:20:07 +00:00
Sam Rawlins 9ec112a509 analyzer: Support declaring and invoking unnamed constructor via 'new'
This adds support for both declaring an unnamed constructor with the
explicit name, "new", and support for invoking an unnamed constructor
as a named constructor named "new".

The parser will report EXPERIMENT_NOT_ENABLED if the experiment is not
enabled, as the parser takes care around the keyword, "new".

Tearoff support will be separate.

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: Iaf3af333dd22337b560aa7f4e5811a4cb38b2a7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-08-03 03:06:41 +00:00
Danny Tuppeny 4a714b27d6 Reland "[analyzer] Use "pub outdated" to get version numbers for pubspec completion"
This is a reland of 9cbc497d0a

Original change's description:
> [analyzer] Use "pub outdated" to get version numbers for pubspec completion
>
> Change-Id: Ic8ef9514946070d590fc4594db4d8474912b40ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207760
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

Change-Id: I8acd224c7982312c48039a1cb439323e040b3859
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208324
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-02 14:33:09 +00:00
Paul Berry b13dc22338 Add an analysis option allowing linter exceptions to be propagated.
This will be used in internal builds to ensure that an exception
occuring during linting fails the build; this should help us be more
confident in the robustness of the linter code.

Change-Id: I4eaa47044b32b45433a67cc919ad047663dc771c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-07-30 20:05:37 +00:00
Danny Tuppeny 00cc25a28b [analysis_server] Support plugin fixes/assists for LSP
Fixes https://github.com/Dart-Code/Dart-Code/issues/3502.

Change-Id: I90ae72d3ea9581a9e50858fae4c8878fd36bcee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-30 15:19:57 +00:00
Brian Wilkerson 4911f0968e Revert "[analyzer] Use "pub outdated" to get version numbers for pubspec completion"
This reverts commit 9cbc497d0a.

Reason for revert: Breaks the flutter build

Original change's description:
> [analyzer] Use "pub outdated" to get version numbers for pubspec completion
>
> Change-Id: Ic8ef9514946070d590fc4594db4d8474912b40ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207760
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,danny@tuppeny.com

Change-Id: I78f8658385f3175d07bd453af0f110eff04741ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208344
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-28 18:33:25 +00:00
Danny Tuppeny 9cbc497d0a [analyzer] Use "pub outdated" to get version numbers for pubspec completion
Change-Id: Ic8ef9514946070d590fc4594db4d8474912b40ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-28 15:26:04 +00:00
Konstantin Shcheglov 1250fa4911 Rename FileResolverTestView.resolvedLibraries
Change-Id: I30431ce52368737c5e0fb3666d30117fb0e77f50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207600
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-21 23:00:08 +00:00
Danny Tuppeny c88193538d [analysis_server] Support resource-specific LSP client configuration
Fixes https://github.com/Dart-Code/Dart-Code/issues/3124.

Change-Id: I724395550ffca14c4cedae46519d568fd0680e02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207663
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-21 17:28:58 +00:00
Keerti Parthasarathy 192ece0637 Add support for checking new name validity during rename.
Change-Id: I67a3e1f02517ae20d8faf73c58ead550820dfaee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207563
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-07-20 23:45:51 +00:00
Sam Rawlins b81dedad12 Do not crash when computing assists for 'sync' function
Fixed: 45768
Change-Id: I54be305f91868975643f3d71197a3763cd45493c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-07-20 16:34:50 +00:00
Danny Tuppeny 094e4fea1a [analysis_server] Support convert method<->getters refactor in LSP
Fixes https://github.com/Dart-Code/Dart-Code/issues/542.

Change-Id: Iff68f0df9956c7dcea560400e558a6e26b6c2ce1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-20 15:37:30 +00:00
Konstantin Shcheglov 62f73a5bd9 Add DartType.alias, deprecate aliasElement/aliasArguments.
Change-Id: I80e0c47c8f431eb504044f4110b55add64c943d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-19 21:56:34 +00:00
Konstantin Shcheglov 320616c42e Revert "Switch Workspace to Packages."
This reverts commit c7421d3406.

Reason for revert: breaks Cider in google3

Original change's description:
> Switch Workspace to Packages.
>
> PackageMapUriResolver is still based on Map.
>
> Change-Id: If6ed2d3181129a6605f60dddd8de5783fafa09d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206700
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com

Change-Id: Icdd360f226ab70df5b19711e49345c4d66f8d8b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/207221
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-16 17:23:08 +00:00
Konstantin Shcheglov c7421d3406 Switch Workspace to Packages.
PackageMapUriResolver is still based on Map.

Change-Id: If6ed2d3181129a6605f60dddd8de5783fafa09d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-16 16:27:37 +00:00
Brian Wilkerson 9db372e6f4 Make Location.endLine and Location.endColumn optional fields in the protocol
In https://dart-review.googlesource.com/c/sdk/+/191862 we added two new
required fields to `Location`. Unfortunately this was a breaking change
because plugins using an older version of the `analyzer_plugin` produce
location objects without those fields, leading to deserialization failures.

This CL makes those fields optional in order to fix the deserialization
issue.

Unfortunately, the `analyzer_plugin` package was published after the
required fields were added. Making them optional is a breaking change
because the constructor parameters go from being positional to being
named parameters.

We also neglected to update the version number of the protocol as part
of the previous CL. Technically this is also a breaking change for clients
of the analysis server, but given that they had no way to test to see
whether these fields existed they would need to have been written as if
the fields were optional in order to reference them at all, so I think
that from a practical standpoint it isn't a breaking change. That does,
however, raise the question of whether we should increment the version
numbers as part of this CL.

Change-Id: I35fc1f8e950669a3d8dd33cee6b81890261b5c47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206942
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-15 17:35:55 +00:00
Sam Rawlins e681abace9 Remove unnecessary imports
TEST=N/A

Change-Id: I7440c1165a7403aad023f002a97c90572cb66c59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205820
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-07-15 16:57:21 +00:00
Danny Tuppeny 5fbc2d3d53 [analysis_server] Add a test to ensure no @soloTest annotations
Change-Id: I03fc4a9881a8effebdc2d8091e2a301678a27468
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206790
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-14 19:42:30 +00:00
Danny Tuppeny de918b2a0c [analysis_server] Use existing context when computing edits for an LSP fix-all request
Fixes https://github.com/Dart-Code/Dart-Code/issues/3469.

Change-Id: I28812eda6b3f2263c0a341309719e8adeb1a143e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206784
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-14 15:04:30 +00:00
Konstantin Shcheglov 79327c9f05 Make ResolvedUnitResult.content/unit non-nullable.
Change-Id: Ia79567d248f2c91290bfdf8204ea7e9f3dc85fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206668
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-14 02:33:10 +00:00
Konstantin Shcheglov c6d59bdc6a Create ErrorsResultImpl() for errors in non-Dart files in EditDomainHandler.
So that we don't need to keep `ResolvedUnitResultImpl.unit` nullable.

Change-Id: I498c6a7e53df8e8844ce1cfe5d52c4f2cb58958b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206666
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-13 22:42:49 +00:00
Konstantin Shcheglov 57ce1255ad Change AnalysisDriver.results to Stream<Object>.
This change is necessary to make `ResolvedUnitResult.unit`
non-nullable.

AnalysisDriver is not API, looking into google3 it seems that there
are no `results` usage outside of analyzer and analysis_server. So,
it should be also de-facto not a breaking change.

I'm somewhat in doubt, maybe add `SomeResult` and use it instead of
`Object` here. This interface should be them implemented by all
other result interfaces, such `SomeFileResult`, `SomeResolvedUnitResult`,
etc.

Change-Id: I2912ed2ddf23753757ff2d85d56193fa411f1225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206580
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-13 00:24:26 +00:00
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 a9618ac795 Make ResolvedLibraryResult.element/units non-nullable.
Change-Id: Ie20c2363b43555573843c038c15c0d55bcf39579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-12 20:48:37 +00:00
Konstantin Shcheglov 672d66cea0 Make AnalysisResult.path non-nullable.
Change-Id: I861643f6c5493b6990c0bacddd81643aaba8e368
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-12 18:21:11 +00:00
Brian Wilkerson 0cd008082b Remove nested const keywords when adding a const keyword
Change-Id: I44a14360f0d223612d5ba1437546c59286f96096
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206440
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-07-10 19:27:00 +00:00
pq edb0220277 quick fix for avoid_unnecessary_containers
Fixes: https://github.com/dart-lang/sdk/issues/45922

Change-Id: Icddecacce88f725bfa72a5b4c0a667250ba268bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-07-09 22:43:20 +00:00
pq 341facafc7 fix for sized_box_for_whitespace
Fixes: https://github.com/dart-lang/sdk/issues/45928

Change-Id: I7755d75267c91f614518e8a47eb1aa12a76628d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206401
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-07-09 21:56:25 +00:00