Konstantin Shcheglov
930895e8a2
Breaking changes for analyzer version 2.0.0
...
Latest google3 presubmit looks green.
https://test.corp.google.com/ui#id=OCL:374078884:BASE:382671882:1625203035014:dc4c1c68
Change-Id: I12f6a8a27b8783652e3a2c16d2f39a672dee4eb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-07-02 19:02:44 +00:00
Brian Wilkerson
38c1d4aaf8
Remove support for the deprecated dartfix tool
...
Change-Id: I848334cab0dbebe121198bc91ade3a8f68c5f7b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-02 18:30:24 +00:00
Danny Tuppeny
85d455fbad
[analysis_server] Add source.fixAll source command for LSP
...
Change-Id: I2deac95e665a19065a7ef1d8c1f79485497c9de2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-01 17:56:47 +00:00
Danny Tuppeny
dc66d5df62
[analysis_server] Include documentation URLs for diagnostic codes in LSP diagnostics
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3442
Change-Id: Iad741befd31eb1894ca0e45e65dc78902e8ed995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-07-01 14:57:18 +00:00
Danny Tuppeny
f7bb46fced
[analysis_server] Create correct relative URIs on Windows in create_file fix
...
Change-Id: I69c4be3308ca79f81d2f20c2192adceaeae22668
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 22:27:42 +00:00
Brian Wilkerson
47da8db2f6
Add a fix for the use_key_in_widget_constructors lint
...
Closes: https://github.com/dart-lang/sdk/issues/45931
Change-Id: I9b4b3275cd5d7f5ca7e1849f3ec5951f14be9cd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205040
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 21:07:20 +00:00
Brian Wilkerson
f5b28a83e8
Fix a bug in both add_missing_enum_case_clauses and add_missing_enum_like_case_clauses
...
We should rename ClassMemberLocation to reflect the wider usage, but I
thought it would be better to do that in a separate CL.
Closes: https://github.com/dart-lang/sdk/issues/38693
Change-Id: I657f7945022b09eb8deb89d8f2f5d43164fe53cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205061
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-28 18:04:52 +00:00
Danny Tuppeny
5dbf8992ed
[analysis_server] Include file path in generated "part of" statements for unnamed libraries
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3268 .
Change-Id: Ic681da09d0161e2e432959989db8c8002b1669a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 17:13:41 +00:00
Brian Wilkerson
86e3c1b231
Add a fix for the unnecessary_string_escapes lint
...
Closes: https://github.com/dart-lang/sdk/issues/45930
Change-Id: I7b50756256867174aa11adf7d29a67d2cb012839
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-28 16:05:02 +00:00
Brian Wilkerson
0e4c640451
Suggest void as a return type in existing generic function types
...
Change-Id: I88c37e5ce273de2e9598b182fc5fb61066c11740
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-23 14:04:21 +00:00
Brian Wilkerson
9b4ff5e5a6
Fix the extract method refactoring to correctly handle nullable return types
...
Change-Id: I2a885887a8d871f0c61afd6648843b914c59022d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204626
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-23 01:10:07 +00:00
Devon Carew
4f5d4731c5
[analysis server] update the text for an error message
...
Change-Id: Ia7d6aded597409f1c5afabb06dc7c479ff9b4f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204624
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-23 00:01:57 +00:00
Brian Wilkerson
56bf5230ca
Enhance the AddTypeAnnotation fix to support prefer_typing_uninitialized_variables
...
When a local variable doesn't have an initializer we now look for
assignments to find a reasonable type. This will not only allow this
lint to be fixed but will increase the number of places the assist is
offered.
Change-Id: Ib278477d277557aff7d2ddbcca3230f2a0a144b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-22 22:50:37 +00:00
Danny Tuppeny
c073fb6257
[analysis_server] Switch to checking isSynthetic for argument lists in LSP completions
...
Change-Id: Ie57717baff1b20b6c9a9c17dd12723eecf4bfc6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204405
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 19:02:22 +00:00
Danny Tuppeny
ad6c732663
[analysis_server] Support LSP SignatureHelp for type argument lists
...
See https://github.com/Dart-Code/Dart-Code/issues/2834 .
Change-Id: Idce0d0b133b1f40c1953e5f1c5f4531701a68c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 14:56:44 +00:00
Brian Wilkerson
9da9768992
Use the context type to determine whether to suggest functions returning void
...
Change-Id: I78dac1852cb08f01927ef7fc2603d7de0b3dd891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 20:46:24 +00:00
Brian Wilkerson
2afc8161f4
Add a fix for exhaustive_cases that adds cases for the missing constants
...
Closes: https://github.com/dart-lang/sdk/issues/45923
Change-Id: I641c016dc73153d521f43c9ce4d333b50b4a702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 20:17:03 +00:00
Konstantin Shcheglov
f398c9f3c1
Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE in analyzer/ and friends.
...
Change-Id: I1019d9c083b825a9f3418bc56ed410e0ba5501fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204085
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-18 16:07:26 +00:00
Brian Wilkerson
9ecdfcc8f3
Improve the suggested keywords in formal parameters
...
Change-Id: Iea099dc140865b109309cd932735f2d0a65fcfd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204080
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-18 15:49:31 +00:00
Danny Tuppeny
75bcd5ca33
[analysis_server] Improve coloring of invalid/unresolved methods in LSP semantic tokens
...
See https://github.com/Dart-Code/Dart-Code/issues/3412 .
Change-Id: Icc44ff0537122d6d2211d64037666ecb58a28bd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-17 20:15:21 +00:00
Danny Tuppeny
41af64d0f4
[analysis_server] Use correct EOL characters for document in ignore_diagnostic fix
...
Change-Id: I36f23bf164e2005a99181a4623a5dbd7acf94cda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-17 17:36:11 +00:00
Danny Tuppeny
2e411e5957
[analysis_server] Add quick-fixes to ignore lints/hints for line/file
...
Change-Id: I773704cccffc7a7da169b3d759b80b07267c88ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-17 15:37:11 +00:00
Konstantin Shcheglov
ccb3943e48
Check for workspaces consistency after analysis contexts creation.
...
Bug: https://github.com/dart-lang/linter/issues/2694
Change-Id: I13cae115e48ae794e0751b6099f864ca9d202cdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-16 00:02:53 +00:00
Danny Tuppeny
f4b4882f48
[analysis_server] Add highlights/semantic token support for conditional imports/exports
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3395 .
Change-Id: Ic5b9adbb4f92e5fd59c6f09dddd1e0b1b827d5c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-15 16:29:12 +00:00
Danny Tuppeny
f00812b5ce
[analysis_server] Set CompletionSuggestionKind for extension members
...
Change-Id: Ie5589ae1c3794fd8b2d335192009e65f2129a0d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-15 16:26:02 +00:00
Brian Wilkerson
f06f09246e
Suggest void in a type declaration list to support function types
...
Change-Id: I2514cfd80cec6cbec7703009ba5a12df4640c560
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203663
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-15 00:49:03 +00:00
Brian Wilkerson
cbdb20d417
Erase nullability after a null-aware operator when matching extensions
...
Change-Id: I6852f6acc4fb27bdfa3686b214c7c34d40c18bfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203664
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-15 00:41:09 +00:00
Danny Tuppeny
5c0b3877e3
[analysis_server] Prevent extension methods showing in completion in comments
...
Fixes https://github.com/dart-lang/sdk/issues/46351 .
Change-Id: I762ccccceb0ec0fa453f5acb727e8c94472ac45d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-14 15:30:33 +00:00
Danny Tuppeny
d75becf4ac
[analysis_server] Enable multiline element descriptions for all hovers
...
Change-Id: I5521cb09172b5eee639a4d3e9e21eb5871d6a86f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202971
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-13 15:50:32 +00:00
Brian Wilkerson
d5d1d6e6f6
Suggest void after equals in typedef
...
Change-Id: If85a55e15b6a98d754453860bb82d85b6fa613f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-11 17:47:37 +00:00
Konstantin Shcheglov
4936904e9a
Prepare for -1 as nameOffset of synthetic PropertyAccessorElement(s).
...
Change-Id: Ia8f2760475e2bc465329c1bcdc08732d1a338ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203295
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-11 16:38:06 +00:00
Brian Wilkerson
b11e0de9f7
Suggest extension members inside extensions
...
Also suggest 'dynamic' after 'as' in a type cast.
Change-Id: I1e9f9f3a894e2c094aa4a6785fcdcfc60fb34260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203289
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-11 13:45:36 +00:00
Danny Tuppeny
419fd676d2
[analyzer] Enable create-file fix for export directives
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3269 .
Change-Id: Ieced8751291a9c6b98508c708104915dc011cd2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202966
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-09 19:06:22 +00:00
Danny Tuppeny
5a04c08c43
[analyzer] Format signatures in LSP hovers over multiple lines
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3357 .
Change-Id: I999ca8d3ffb7311ea4f60586e75160ae87292a77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-09 19:02:12 +00:00
Danny Tuppeny
3690f549b0
[analyzer] Mark void keyword with a modifier for LSP semantic tokens
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3308 .
Change-Id: I2395caa7b52fe690621cb31d87136f236f0efed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202965
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-09 18:50:42 +00:00
Danny Tuppeny
6d763b4565
[analyzer] Include analyzed context in include_file_not_found errors
...
May fix https://github.com/Dart-Code/Dart-Code/issues/3259 .
Change-Id: I4a81acd9186efacc90584c756fc9aef224378c65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-09 17:59:07 +00:00
Devon Carew
1acb443145
[analyzer] cleanup references to the .analysis_options file
...
Change-Id: I08f491b06925a420069019b77177839e8310843c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202868
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-09 15:52:31 +00:00
Konstantin Shcheglov
394cff2758
Deprecate CompilationUnitElement.types, use classes instead.
...
Change-Id: Iffdc077d24f2387956953fd8b479d782f5217441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202729
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-07 22:04:13 +00:00
Brian Wilkerson
7d2ffd78de
Make correction producers know whether they can be bulk applied
...
This change makes sense to me for a couple of reasons. First, when
editing a correction producer the information about whether it can be
bulk applied will be easier to find. Second, the information doesn't
need to be duplicated when the producer can be applied to multiple
error codes. And third, because the information is in one place we can't
enable a producer in one place and miss enabling it in other places.
This does have the unfortunate consequence that an extra producer needs
to be created for bulk application in order to determine whether it
should be applied at all, and can't be re-used because producers
maintain state. We could consider storing a 'generator' object rather
than a generator function in the map and have the `newInstance` methods
produce those objects, but I'm not convinced that it's worthwhile given
how short lived the extra producer is.
There was also one subtle change that you probably won't see by looking
at the changes, which is that one of the producers was enabled for bulk
application for a lint but not enabled for several non-lint cases. It is
now enabled everywhere. I remember thinking at the time that it should
be fine, but I've forgotten which producer it was, so I can't easily
tell you. If you want to confirm that change I'll be happy to do the
work of figuring out which producer it is and which error codes were
impacted by the change.
Change-Id: I2010d777f727472c0d307a6948b84d37491e2b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-06 16:07:31 +00:00
Brian Wilkerson
75c9f63da0
Fix completion for redirecting constructors
...
Change-Id: Ia082b04ab90a9541b1eeec12c6c5f7f8379d3af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-04 20:16:47 +00:00
Keerti Parthasarathy
e1f37f6029
Also return lineInfo and oldName from canRename
...
Change-Id: I5ae683cdfe3a82d8dea72745d77d8dcb435c0759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202280
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-03 20:49:42 +00:00
Brian Wilkerson
4aef907927
Suggest void and other keywords inside the first token of a parameter declaration
...
We suggest user-defined identifier anywhere inside the first token, so I
think we should be consistent and suggest keywords there as well. As a
bonus, this will increase the accuracy of our completion metrics.
Change-Id: I88daf6b3b047ccfacd06cf25184d8bbbf42c682b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-02 18:38:44 +00:00
Brian Wilkerson
dbdde949e0
Suggest Never when types are appropriate
...
This also fixes a bug in the completion metrics that I found while
adding the suggestion. The bug happens when an experiment causes a kind
of completion to be produced that wasn't produced before.
Change-Id: I244ae41161a9ff607c18273d0744f3cf27eb5caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-02 17:46:22 +00:00
Brian Wilkerson
25b71e07e7
Add a quick fix to import extensions when members are referenced
...
Change-Id: Ic7f85cecdc06e255264441db7add6bd4a9bda5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 23:28:25 +00:00
Keerti Parthasarathy
8580370162
Start of rename support for Cider
...
Change-Id: I50a47dafc9e41518a0d15f5c279a57db966afbb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201620
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 18:40:04 +00:00
Danny Tuppeny
10b83a4882
[analyzer] Tag constructor names as methods instead of classes in LSP semantic tokens
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3374 .
Change-Id: Icb6e6b01e3abd77aa9da02ac9d9c9d62b77e2c21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201831
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 15:22:23 +00:00
Konstantin Shcheglov
d05093e5f9
Deprecate ImportElement.prefixOffset
...
Change-Id: I74441b4c060c326b68c446b2483d6509dd2b2970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201663
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-28 23:08:34 +00:00
Brian Wilkerson
f09b484cca
Fix a couple of bugs in DocumentationCache
...
Change-Id: I66a890a1aebc39d9cf11acd82d285b2328574102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-27 17:55:54 +00:00
Konstantin Shcheglov
d2682070f4
Use explicit FileContentCache instance for AnalysisContextCollectionImpl.
...
Previously we cached file contents implicitly, using Expando on top
of ResourceProvider. This is somewhat dangerous, and does not allow
us to decide when to cache, and when to invalidate.
Change-Id: I5c93ac22f217bb2baba6b7f6e73fc05f1c674e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201233
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 00:54:01 +00:00
Brian Wilkerson
bb1ec0869a
Fix a bug in the quick fix to replace string concatenation with interpolation
...
Closes: https://github.com/dart-lang/sdk/issues/46130
Change-Id: Ia58116e538737be121eb753b40f2db155a4a12f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201283
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-25 19:39:41 +00:00
Brian Wilkerson
22a1b93fff
Suggest extension members for an implicit target in extension members
...
I added one test for this case and several other tests for already
passing cases. I think that some of these cases were failing before the
switch away from using available suggestions for imported libraries and
was originally trying to write a test for a different reported problem,
but the test passed.
Change-Id: I989d8419506c59b883fe5b52168e15fd7d68787c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-25 17:35:41 +00:00
Danny Tuppeny
3cf34d172f
[analyzer] Prevent failure invoking signature help in missing constructors
...
Change-Id: I926b6bd5b939e52d33eb2d4be7fcac9ee3483d55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201262
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-25 16:39:41 +00:00
Konstantin Shcheglov
2ce12a1106
Rename AnalysisDriver import prefix.
...
R=brianwilkerson@google.com
Change-Id: Ied277019acac1149d7632144119d048cf6de6274
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201168
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-25 14:53:42 +00:00
Danny Tuppeny
899654d515
[analyzer] Check sort_constructors_first lint when inserting constructors
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/2937 .
Change-Id: I5a0a4675cf78fd512a1dd728d25b31a8d5357d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-24 17:26:40 +00:00
Danny Tuppeny
d3082bcb3e
[analyzer] Add folding regions for parameters
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/1201 .
Change-Id: I2865337861397ae15d2c4515b009fa22c678b5b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201182
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-24 17:13:35 +00:00
Brian Wilkerson
93670dacc1
Add a fix for avoid_returning_null_for_void
...
Change-Id: Ia38d0115157a914fc8f19d6e026e34c4752207de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201102
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-23 15:13:00 +00:00
Brian Wilkerson
f56f9e8f34
Add some validation tests for quick fixes and fix a violation
...
Change-Id: I3e9d049938140600a4dbd9669c9781c50a0c2c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201041
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-05-22 17:05:49 +00:00
Brian Wilkerson
3cc518b3cc
Stop using available suggestions for already imported libraries
...
This is a re-do of https://dart-review.googlesource.com/c/sdk/+/197880
that removes the support for Cider. We might try using this for Cider at
some future date, but I didn't want that support to prevent us from
getting this to users sooner.
Change-Id: Ia5c06a8a3d7366770dedb4f51153c2f4004bb89e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201021
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-21 19:43:55 +00:00
Brian Wilkerson
813c4ab6d4
Add tests and enable bulk fixes for invalid_null_aware_operator
...
Closes: https://github.com/dart-lang/sdk/issues/46013
Change-Id: If7fad2ba8f859897e08bb78046ce45bd57ad0289
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200883
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-05-21 16:19:42 +00:00
MrBirb
5051d4b991
Convert private widget to Stateful without extra underscore.
...
Bug: https://github.com/Dart-Code/Dart-Code/issues/3343
Change-Id: Ica188ab06e24b4d0708bdc1e23aefeebb53bcab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-20 16:17:56 +00:00
Danny Tuppeny
590284e0f7
[analyzer] Add semantic token type/modifier for interpolated expressions
...
This allows https://github.com/Dart-Code/Dart-Code/issues/3318 to be fixed by giving clients something they can use to reset coloring and preventing inheriting from other highlighting they may apply.
Change-Id: I3f1ba2c15d64634b203064d1451fb4fef040eb60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-20 15:38:52 +00:00
Sam Rawlins
cf00cad458
analysis_server: Check for prefer_relative_imports when fixing with new imports
...
If the `prefer_relative_imports` lint is enabled, then suggest relative
import URIs before absolute ones.
Also bring the relevant code in line with Effective Dart:
* DO capitalize acronyms and abbreviations longer than two letters like words. ("Uri" vs "URI")
* AVOID lines longer than 80 characters. (in doc comments)
* DO separate the first sentence of a doc comment into its own paragraph.
* PREFER starting function or method comments with third-person verbs.
Fixes https://github.com/dart-lang/sdk/issues/32916
Change-Id: I2e235cc84bd93e5593a96456eb9b0c615811e268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200660
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-19 22:07:42 +00:00
Danny Tuppeny
cc67085501
[analyzer] Add support for LSP textDocument/selectionRanges
...
This is used to support "expand selection" functionality in editors.
Fixes https://github.com/Dart-Code/Dart-Code/issues/3332 .
Change-Id: I27929b152ef618fb8b57c43e6c6f6e21fe0966dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200427
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-19 16:34:47 +00:00
Devon Carew
b8f4b252ef
move pkg/telemetry to using package:lints
...
Change-Id: I75130cc8d5964ef0f95a672858da8bbce8ffd78c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200520
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-05-19 16:26:42 +00:00
Danny Tuppeny
eb2e8698bc
[analyzer] Escape function names used in LSP snippet completions
...
Fixes https://github.com/dart-lang/sdk/issues/46019 .
Change-Id: Ie4413fe013d7251e579f548e61674a8a4fc1d5df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-17 15:15:20 +00:00
Brian Wilkerson
4e4f07eb22
Unify two tables mapping error codes to fix generators
...
This doesn't change the way any of the fixes can be applied, nor the set
of fixes associated with any code. It merely finishes a re-organization
task that was started earlier.
Change-Id: I911961fe5ec2aea211a6f0a51db24a4c4b32be26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-15 17:07:29 +00:00
Brian Wilkerson
11bbea8797
Generate a name for closure parameters when the argument parameter has no name
...
Change-Id: I75e860a2ead6296c87cd3ea0b3775f455f78eeea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200042
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-15 04:51:19 +00:00
Brian Wilkerson
b42c5c77d4
Cache documentation comments to improve completion performance
...
I'm not convinced that this is the right way to cache comments, so
feedback is welcome.
Change-Id: I2bd393b80e05c26199020e19daf0eadeb99d8c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199303
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-13 16:31:35 +00:00
Danny Tuppeny
f6c91128be
[analyzer] Add an LSP semantic token modifier to escape sequences
...
Work to support https://github.com/Dart-Code/Dart-Code/issues/3329 .
Change-Id: I160c0f350213cd8bfb44319ad39551c84f0007ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-12 21:02:50 +00:00
Sam Rawlins
e5ace6f7c1
analysis_server: Remove unnecessary imports
...
Change-Id: Icdf45541df9707631c9add908abd365e3bbd0c2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-05-11 19:09:44 +00:00
Konstantin Shcheglov
0f8e17083b
Generate State<MyWidget> as 'createState()'.
...
Bug: https://github.com/flutter/flutter/pull/81578
Change-Id: I4128f5473287983c2837a83462261050e72239df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-09 19:55:08 +00:00
Brian Wilkerson
454e633461
Fix a bug in the convert_into_expression_body fix
...
Change-Id: Ieed0452eb1ec89b294e6d567df758b533ac4062f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-07 04:53:44 +00:00
Brian Wilkerson
484c999f12
Add a quick fix for avoid_function_literals_in_foreach_calls
...
Change-Id: I8f209dc884ef2eb19cc12a7f10f52621237c7964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198560
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-06 18:35:43 +00:00
Danny Tuppeny
b3993c9349
[analyzer] Map all LSP integer/uintegers on to Dart's int type
...
Change-Id: I714bafdf378b8a29ba847c8d39ebe96977fc977e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198043
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-04 15:37:41 +00:00
Michal Terepeta
9ff5ac12c6
React when Bazel/Blaze prefix changes
...
Previously if no Bazel/Blaze symlinks were present, we defaulted to the
`bazel-*` ones and never checked if that assumption was accurate. This
change starts watching the symlinks and recreates the analysis contexts
if a symlink gets added. This way we'll run the `BazelWorkspace` code
again and use the correct paths.
This is quite important since `bazel/blaze clean` does remove the
symlinks so if the analysis server starts at such a point, we would
never find any generated files if the workspaced turned out to be a
Blaze one.
Bug: http://b/175087705
Change-Id: If7bb21c7d69a3092832c18004691d56949e5af54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-05-03 07:35:58 +00:00
Brian Wilkerson
58413c5d54
More performance improvements related to getting documentation comments for code completion
...
Change-Id: Ie319009e4d13755da4c720923122b2bc5a6c7c21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197564
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-02 16:44:18 +00:00
Danny Tuppeny
9d015feeaf
[analyzer] Add a "constructor" modifier for LSP semantic tokens
...
Fixes https://github.com/dart-lang/sdk/issues/45861 .
Change-Id: Ib97e14d6e23dfd0c48e1ad8abb18b42a4c2f9cb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-30 17:04:26 +00:00
Danny Tuppeny
a89fccb482
[analyzer] Support "Inline Method" refactor in LSP
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/547 .
Change-Id: I02f905673820ef22b5b10055f32710d660beaa2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-29 15:52:45 +00:00
Ivan Inozemtsev
0914948979
Use workspace.getPackageFor to get analysis roots from open files
...
Using ContextRoot.root locations directly leads to analyzing the whole
workspace for Bazel workspaces.
Change-Id: I44a31a5bc6043eaaea0e9c83f6261d54443ad7a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196494
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-28 06:20:52 +00:00
Danny Tuppeny
8f2c0e9bb8
[analyzer] Suppress insertion of completion parens/arg placeholders when they already exist
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3303 .
Change-Id: I284608ba850b5ed2008b8cdd707bc1becc73872d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-27 18:28:10 +00:00
Danny Tuppeny
115a758d87
[analyzer] Include null postfix operator in display strings for code completion, signature help, etc
...
Change-Id: Iffeda6b3efa3d2bcd4c09a63ab8870b69bc155aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-27 18:27:48 +00:00
Danny Tuppeny
8ae2eb94ff
[analyzer] Support "Inline Local Variable" refactor in LSP
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/545 .
Change-Id: Ibee992ab1e5ff13b849d6e1151e21d9229087d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197046
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-27 15:56:08 +00:00
Danny Tuppeny
bb8b26596b
[analyzer] Support folding enum declarations
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3225 .
Change-Id: I90aae85c2aaaa034b8190c5bfe1ab66fe6fc0e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197044
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-27 15:45:38 +00:00
Danny Tuppeny
1e51549fab
[analyzer] Don't show duplicate code completions for items imported via multiple libraries
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3227 .
Change-Id: Iac5704fea4f00470040b6b94bbf508dd916ed234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196923
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-26 16:48:28 +00:00
Brian Wilkerson
eb1ce5d640
Remove some unnecessary null checks
...
These were found using the unnecessary-null-checks lint. It has a bug
that prevents us from enabling it at the moment, but we should consider
enabling it once the bug has been fixed.
Change-Id: Ice250b5a6a8723c5f08dec5b07ae738e17c842cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196550
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:22:43 +00:00
Danny Tuppeny
8a0897c165
[analyzer] Fix a bug with completion ranking for items with 0 relevance in LSP
...
Change-Id: Ic4ef390ba4bdc627e075ae9dade8ced5a307a8ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196667
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:13:32 +00:00
Brian Wilkerson
1ad68b9b16
Make local variables that hide fields be final (analysis_server)
...
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.
Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:12:07 +00:00
Brian Wilkerson
30d27c6f61
Migrate all remaining server libraries except the library in bin
...
Change-Id: I2041763971a85fb8e9530b64ef30d106091c9739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196547
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 04:19:22 +00:00
Paul Berry
b10a592341
Add a url
field to DiagnosticMessage.
...
This paves the way for allowing analyzer and analysis server clients
to format diagnostic message URLs in a special way (e.g. to make them
clickable).
Note that DiagnosticMessage is part of the public API of the analyzer,
so I've retained the old behavior in a deprecated fashion to avoid
breaking clients that don't yet handle diagnostic messages containing
URLs.
See
https://dart-review.googlesource.com/c/sdk/+/193749/comment/86d1ce4b_77a60b1e/
for additional discussion.
Change-Id: Iae9d43a2be7dbc67cb7cb82afe0a7824043d6113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-23 20:34:32 +00:00
Danny Tuppeny
a1f0f1b700
[analyzer] Migrate LSP integration tests to null-safe
...
Change-Id: I0fff9271ef796bc9b3f8316080068d667183f1b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195991
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-21 16:49:30 +00:00
pq
bd2e564e57
+ bulk fix for sort_directives
...
Change-Id: Ie347357a5a5f1d38716fd83c723d09b268a8859d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196108
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-04-20 21:20:03 +00:00
Danny Tuppeny
97e9186df8
[analyzer] Improve null handling in LSP server
...
Change-Id: I2060912853d131fad1d02ddc68f0b62ab16e3b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-20 19:30:38 +00:00
pq
34e7f575d6
fix in file support for UNNECESSARY_NON_NULL_ASSERTIONs
...
Fixes https://github.com/dart-lang/sdk/issues/45769
Change-Id: I533969b7a7acc6258ad38e9ee45c5441921d7af7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196025
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-04-20 18:06:28 +00:00
Danny Tuppeny
2aa2b30982
[analyzer] Tidy up some LSP null-safe changes
...
Change-Id: I0090d524180463ccd0c0240ece59b2386b9eb408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195993
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-20 16:41:47 +00:00
Konstantin Shcheglov
7d1aedca3c
Remove nullability from naming conventions.
...
We don't allow nulls there anymore.
Change-Id: I44639fee24bbd3856798ae15739b70cc0c660b25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-20 16:32:33 +00:00
Konstantin Shcheglov
af4b4d9575
Update NamespaceDirective.uriElement to return LibraryElement?
...
Change-Id: Ief36ea6d6dc0fab4a1f6976e034418695bd2e128
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196043
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-20 16:27:49 +00:00
Danny Tuppeny
9b529bb8fe
[analyzer] Fix handling of overlapping LSP SemanticTokens
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3289 .
Change-Id: I15c41f1519a0c06b810be8e840e8ef7c13af45ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195995
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-20 16:18:38 +00:00
Konstantin Shcheglov
9dd51c80bd
Deprecated getFile() and getSourceKind(). Added getFile2() instead.
...
R=brianwilkerson@google.com
Change-Id: Ia52967472077abd73cdf4df1320dd71b5dee98b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-19 23:57:19 +00:00
Brian Wilkerson
d217bb11a3
Migrate SocketServer and some of its subclasses
...
Change-Id: Icf3c06b0b022a35e722c5f2ac4ec5a97d6aa996c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196024
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-19 23:33:58 +00:00
Danny Tuppeny
77466f2b83
[analyzer] Migrate remaining LSP code to null-safe
...
Change-Id: I52c7d16bdaf9f68148a8d7a956330bc54608ec43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-19 19:35:28 +00:00