Konstantin Shcheglov
8f70d95df0
Use TypeAliasElement.aliasedType instead of aliasedElement in analysis_server/..
...
Change-Id: Ib7c144b12c59a09be98f3a461bd50b5e0a663fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-09-12 19:38:19 +00:00
Danny Tuppeny
8e2dbc1cdc
[analysis_server] Add support for showing inferred types via inlayHints
...
Change-Id: I075871df3e6bec89f03f55e1387d479a48123713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258807
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-12 18:26:07 +00:00
Konstantin Shcheglov
168e7444dc
Add pumpEventQueue() to getTestCodeSuggestions(), try to fix race.
...
Change-Id: I8d8c30b014a8bd2770fa4f62131d05944a5d186a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258511
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-09-09 21:32:54 +00:00
Konstantin Shcheglov
20095b844a
Use textual dumps for more completion tests.
...
Change-Id: If1160950c9f851cdb311ca1d35f02493ebc2d76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258505
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-09 16:41:24 +00:00
Konstantin Shcheglov
f31547fecd
Use textual dumps in completion/dart/declaration tests.
...
Change-Id: I935031644543fbc9c8b8811669e41acff880018f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-09 00:30:23 +00:00
Konstantin Shcheglov
ee57ecbedb
Use textual dumps for a few tests in completion/dart/location
...
Change-Id: I5fdec2ab84a59a2af5b31583c8a6dbf3aad53a0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-08 23:45:33 +00:00
Konstantin Shcheglov
ace52d922b
Semantic highlighting for record type annotations and literals.
...
Change-Id: I16fb395a721f4fdd63cbf23b931551ea0f5c8682
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258323
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-08 21:55:53 +00:00
Ahmed Ashour
3584073fbc
[analysis_server] AddReturnType
to handle operator
...
Fixes #49913
Change-Id: If7fb8b47d1211f11242f4c58365537ba3ead08b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258241
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-08 18:57:03 +00:00
Danny Tuppeny
292ba46112
[analysis_server] Add some initial docs about running/debugging server from source in VS Code
...
Change-Id: I1218b3b583bc61d45a9568016ca825460717c12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-08 18:55:53 +00:00
Ahmed Ashour
ac3695447d
[analysis_server] update FlutterTest
...
Fixes #49926
Change-Id: I3b2fe6962498cf40a332e0852702ed0b2e20a43a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258244
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-08 17:28:03 +00:00
Danny Tuppeny
b5c7af0417
[analysis_server] Don't search the same files multiple times when referenced by multiple drivers
...
See https://github.com/Dart-Code/Dart-Code/issues/4106#issuecomment-1239564686 .
Change-Id: I6fa86c9fe76e7410cbb00f31798ba3f1961e98ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-07 21:55:02 +00:00
Konstantin Shcheglov
6f0fe880c4
Breaking changes for analyzer version 5.0.0
...
Reland of https://dart-review.googlesource.com/c/sdk/+/243164
Change-Id: I5167844ea1001f026cf8d9b82465a79f560d188d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257267
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-07 16:27:18 +00:00
Konstantin Shcheglov
fe8b5f5e5a
Support for RecordType in 'Extract Method' refactoring.
...
Change-Id: Ie0808e0f2c529bc947e5a446aef9b3394d972465
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-06 18:51:26 +00:00
Ahmed Ashour
9d1e142ee9
[analysis_server] ConvertDocumentationIntoLine
to handle not aligned start
...
Fixes #49578
Change-Id: I19411576631361f003bdf5bb4a09e79bcf5b9a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 18:33:41 +00:00
Ahmed Ashour
63f69b4756
[analysis_server] add a quick fix for some AnalysisOptionsHintCode
...
Fixes #49513
Change-Id: Ib4a1b68c95c2f379e8cbdaf62b2b17bf0a25e7b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252580
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 18:26:46 +00:00
Konstantin Shcheglov
6484fa91ab
Test that class references are indexed / searched / renamed in record type annotations.
...
Change-Id: I29d9645c2509829e9dd8ba44ded7b38bbab217e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-06 17:24:06 +00:00
Brian Wilkerson
35d19a460c
Fix the windows bot
...
Change-Id: Ic994e14d99def196dfb8457e5cceb33ba2e16971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 16:18:28 +00:00
Ahmed Ashour
6587bfbc6c
[analysis_server] fix AddNullCheck
with incompatible types
...
Fixes #49333
Change-Id: I96311080f7dbcb1531baed311d8b4877609842ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 15:33:07 +00:00
Ahmed Ashour
50594939e9
[analysis_server] fix ConvertDocumentationIntoLine
...
Fixes #49509
Change-Id: Ib59f60509b8fa17444f1bc8fe26e4a32586f359a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252581
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 15:26:02 +00:00
Danny Tuppeny
daa733ef43
[analysis_server] Use LSP CompletionList.itemDefaults when supported to reduce payload size
...
Change-Id: I9bdd493a843552fdddb947e06a62a6602398a363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 15:17:54 +00:00
Danny Tuppeny
f8d3a6507a
[analysis_server] Clean up LspClientCapabilities constructor
...
No functional changes, just extracting some code from an initializer list to factory constructor so variables can be reused/code simplified (in preparation for adding some more).
Change-Id: I7df9bf75679363b76a08929a773e40068957b638
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257643
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 15:09:51 +00:00
Danny Tuppeny
8bf496e5a7
[analysis_server] Fix missing newlines after types in LSP hovers
...
Consecutive lines in Markdown are rendered as a single paragraph. To prevent these being joined together, they need an additional newline.
Fixes https://github.com/Dart-Code/Dart-Code/issues/4120 .
Change-Id: I8c6270cae51c2b580a13bd799e1c4c99a1d18a8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 15:03:59 +00:00
Danny Tuppeny
1c8bb855c3
[analysis_server] Don't fail to resolve completions for unimported extension members
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/4143 .
Change-Id: I3c5a6d3bd60a6e1b5b4e432367c24deb41309f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-06 15:01:48 +00:00
Brian Wilkerson
c191725dee
Test that record types work correctly in outlines
...
I don't believe there's any way for record literals to show up in the
outline, and I think this is a reasonable representative sample, but if
you think more tests would be better, let me know.
Change-Id: Ia62ad30d860d70a483249879f2ae8bea8e65b6a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257442
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-06 14:26:26 +00:00
Brian Wilkerson
cf2448e5d4
Fix the windows bot
...
Change-Id: If0525c4a0caaa9e229ea2c516d916e1e3a323a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257426
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-03 04:38:23 +00:00
Brian Wilkerson
a186d80b0f
Add semantic highlighting support for record literals
...
I don't believe that we need any semantic highlighting for record types.
Change-Id: I33d8d3b91c30e4780e6909d4d201f211cefe9814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257425
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-02 22:32:14 +00:00
Brian Wilkerson
2f758c7389
Add tests for hovers related to record types and literals
...
As far as I can tell, there's no implementation work that needs to be
done. Let me know if there's an interesting case that I missed.
Change-Id: Ib6200d07fd2c6ef21749e522705810f537f053df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257423
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-02 20:12:43 +00:00
Brian Wilkerson
7d91a99f55
Add folding support for record literals
...
At this point I'm not planning on adding folding for record types because we don't fold any other type annotations. Let me know if you think that's the wrong decision.
Change-Id: Ibcac086fabfaf841ac3450cdd549accfb10c6188
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-02 20:01:43 +00:00
Konstantin Shcheglov
3b3d061030
Completion in RecordTypeAnnotation.
...
Change-Id: Ic3478551c39d5188e2de2a8245189e5e0674e722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-02 19:05:53 +00:00
Konstantin Shcheglov
dd8146e17f
Use assertResponseText() for a few completion tests.
...
Change-Id: Idc331e401970b7e439626fcec336ec3f4acb932c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-02 00:53:42 +00:00
Konstantin Shcheglov
a524f04c27
Completion in RecordLiteral(s).
...
This also introduces CompletionResponsePrinter, which I'd like to use
instead of fluent APIs. At some point I decided that using easy to
produce, and easy to update expectations is better. Fluent API based
tests are too magical and require too many helper extensions. Also,
with textual dumps full actual results are visible, so it is easy to
compare them with expectations.
The missing key part for using textual dumps in completion tests, that
I realized only recently, was filtering. So, we don't need to dump
every available type, but we can focus on specifically named, or
specifically filtered, entities.
And configuration for `withX` flags lets us enable including features
that are interesting for a particular test suite.
Change-Id: I4a7f7ec99ed202333cf56cd3bb0dfec9ae5c39f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-01 18:57:02 +00:00
Ahmed Ashour
ca010f7ffd
[analysis_server] EncapsulateField
to handle parameters
...
Bug: #49872
Change-Id: I6a4a669abbaf129a6c24f38163b2bd44ea567970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-01 17:23:02 +00:00
Konstantin Shcheglov
ff8024fc78
Revert "Breaking changes for analyzer version 5.0.0"
...
This reverts commit d8df88cbe4
.
Reason for revert: breaks Flutter HHH, requires updates to linter
Original change's description:
> Breaking changes for analyzer version 5.0.0
>
> Change-Id: Id9f27b6c41829249f6b2e7b93ad396643193fc78
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243164
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
TBR=scheglov@google.com ,brianwilkerson@google.com
Change-Id: I6ca213427189c169ddacbd89f60d463efa2c38f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257122
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-31 21:05:19 +00:00
Konstantin Shcheglov
69947a9b11
Compute context type for RecordLiteral fields.
...
Change-Id: Id39e9c5ddb4f472d51d3a542b83c7ad055f24176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256971
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-31 18:37:19 +00:00
Danny Tuppeny
75b17a180b
[analysis_server] Don't apply potential edits in LSP refactors
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/4131 .
Change-Id: I6555cadad7a21256b476c585729187e1cd68cfef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-31 15:49:09 +00:00
Konstantin Shcheglov
d8df88cbe4
Breaking changes for analyzer version 5.0.0
...
Change-Id: Id9f27b6c41829249f6b2e7b93ad396643193fc78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243164
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-31 05:08:50 +00:00
Konstantin Shcheglov
cfde826cc0
Code completion for record fields.
...
Change-Id: I03134b2c0c7fac2595c23b00f9d13b5e344d15a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256961
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 23:11:08 +00:00
Ahmed Ashour
17e0f87252
[analyser] add MISSING_DEFAULT_VALUE_FOR_PARAMETER_POSITIONAL
...
Fixes #49816
Change-Id: I48f3c21fcf552e21da70cf12adf3671c3f490695
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 20:55:38 +00:00
Danny Tuppeny
11a5228e2f
[analysis_server] Extract declarations search for compilation units
...
+ review tweaks
Change-Id: I7675cc70d12b923738194e475e2d24267da21237
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256827
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 19:49:18 +00:00
Ahmed Ashour
8a551b92c7
[analysis_server] Fix AddSuperConstructorInvocation
with named parameters
...
Fixes #49514
Change-Id: I8eb0095a7fbf770e5e2bda3ba3ec78af40b03afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256842
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 18:59:52 +00:00
Ahmed Ashour
0f5d9b080c
[analysis_server] don't write if_null for NullLiteral
...
Fixes #49812
Change-Id: I507ceb3c722f0efdeb02c79a72d31ccf60314495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 18:51:48 +00:00
Ahmed Ashour
991615470f
[analysis_server] Add quick fix for combinators_ordering
...
Fixes #49450
Change-Id: I60f8d703002d94152d31fc4ad192fdab9271ffb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-08-30 18:38:58 +00:00
Ahmed Ashour
c8f74cfb7d
[analysis_server] fix UseCurlyBraces
with comments
...
Fixes #49539
Change-Id: Iebdfcca17e26389270ce7fc545a9a74b363345d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 18:27:18 +00:00
Danny Tuppeny
bd867e630c
[analysis_server] Use part's CompilationUnit for path/LineInfo when searching declarations
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/4129 .
Change-Id: I4dbfb0e5837b649cb85458c3c0d2cd067cbcc511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256826
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 17:39:58 +00:00
Sam Rawlins
34ef0cf762
Mark some enum diagnostics as needing fix
...
Work towards: https://github.com/dart-lang/sdk/issues/49446
Change-Id: I5295a1b4bba83026672fa87d56a59e0818dd7e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256800
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-30 14:05:29 +00:00
Jens Johansen
cec94a1446
[parser] Empty record types, record types with 1 element
...
This should bring parsing of record types up-to-date with v1.6 of
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md
Also fixes https://github.com/dart-lang/sdk/issues/49826
Change-Id: I3737a72ddee49a957bd55f86cc200fb77f23e2a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-08-30 11:04:10 +00:00
Jens Johansen
a4352d09e1
[parser] Record literals can be const and one-element only
...
This should bring parsing of record literals up-to-date with v1.6 of
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md
Change-Id: If39bb1834137da55ef8bd1923106bbc614ea319b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256461
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-08-30 10:54:08 +00:00
Ahmed Ashour
23507bf6ab
[analysis_server] add a quick fix for AMBIGUOUS_EXTENSION_MEMBER_ACCESS
...
Fixes #49489
Change-Id: I49b34dd267a2b3b9e6639c3857de546d9f9995d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-29 18:19:00 +00:00
Brian Wilkerson
a3f8672778
Add a highlight kind for record literals
...
I don't think that there are any other highlight kinds we're going to
want to add, but if you can think of any please let me know.
I'll add code to actually associate the kind with record literals in the
next CL.
Change-Id: I15922984d96c2d0c7d97ea3f3832a95a68172968
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256524
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-26 21:22:53 +00:00
Brian Wilkerson
9d1a877082
Generate diagnostics for invalid field names in record literals
...
Change-Id: I12ece78e257b1265d86114e8c17e6a8c641559e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256364
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-25 17:47:06 +00:00
Danny Tuppeny
857a0d2e66
[analyzer] Resolve comment references for inherited members
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/4114 .
Change-Id: I47fe2909e4d09366c1e2f432c31076ba690fac7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256162
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-25 14:29:43 +00:00
pq
103a2fa642
[dart fix] detect and report un-enabled lints
...
Change-Id: Ie113348ae442f93ae2ea49afb2ed1b0305a6da03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256245
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-08-25 04:23:12 +00:00
pq
c0e74c4433
[dart fix] report undefined diagnostics
...
Fixes: https://github.com/dart-lang/sdk/issues/49699
Change-Id: Ia412e4dce51b0887c3cd0d9b6d91f0ace926bea3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-08-24 20:35:59 +00:00
Danny Tuppeny
ece330a700
[analysis_server] Include annotation completions at end of class
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/3182 .
Change-Id: I93d7606cbbf9c527f31dcf9d0fb502dac581abc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256068
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-24 19:25:39 +00:00
Brian Wilkerson
2b27d3257b
Report duplicated field names in record literals
...
Change-Id: Ifc5c3a06c7f489b00421f5b1af47df52615694d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-08-24 16:33:49 +00:00
Danny Tuppeny
177147bac3
[analysis_server] Improve handling of document modifications while computing completions
...
This prevents an issue where typing during completion can cause completion requests to completely fail (returning 0 items) just because snippets couldn't
be computed.
Change-Id: I20fb457a700ec12317d0146b3364e6f1a4f96177
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256214
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-24 15:53:00 +00:00
pq
1b2644afd2
[bulk fix] report undefined diagnostics
...
Change-Id: I4abe1e83c56e632f91a81510ec0a35b521cd11d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-08-18 16:11:36 +00:00
Konstantin Shcheglov
05d01e79cc
Highlight 'required' in SuperFormalParameter.
...
Change-Id: Ia25378e88eced277bb6242c8cea6bbf09dbb521a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255601
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-08-18 15:56:17 +00:00
pq
c4766b319a
bulk fix support for specified diagnostics
...
Change-Id: Ifa98da5466b0efb1b88cfa17d06b6b4e1d4ba8d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-08-17 17:50:03 +00:00
Sam Rawlins
4fcbbb107a
Add CAST_FROM_NULL_ALWAYS_FAILS check
...
Fixes https://github.com/dart-lang/linter/issues/3605
Change-Id: I5f9a2b127173aa9f2cc6f8fcee9c93e96cb63663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255149
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-08-16 23:41:02 +00:00
Jens Johansen
8a1dbb160f
[parser] Parse record literals
...
This is the first stab at implementing the record expressions from
https://github.com/dart-lang/language/blob/master/working/0546-patterns/records-feature-specification.md
Change-Id: I2adb6cb3cd50d4ee45e144e86ec7011d046f6170
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253783
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-16 06:36:36 +00:00
Konstantin Shcheglov
4eb511da43
Replace more Bazel with Blaze, some simplifications.
...
Change-Id: I096860e17ce56c2f602718f11706f24989c1f65b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-15 19:50:46 +00:00
Konstantin Shcheglov
293c39cfce
Add RecordElement, RecordTypeImpl, implement basic subtyping.
...
Change-Id: I54ac91dfc5a4e01b6f960b865d3d73d11bd0cd84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255040
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-13 00:56:51 +00:00
Brian Wilkerson
33b0180e37
Remove an unused instance getter
...
Change-Id: I0655a7a3f205dadb555bb8e9f9411e0e08ef68f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254982
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-12 18:55:33 +00:00
Brian Wilkerson
dd45694e84
Remove some casts per review comments
...
Change-Id: I4160cec1524994145d6c0ec25ff4b35ae028a0cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254723
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-12 13:55:58 +00:00
Konstantin Shcheglov
66038b732a
Roll latest linter, 304042aaa933a02d2581ab9598dd2ddaebdbc803
...
Change-Id: I56edf420115793814b162eb779324619332ddb8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-12 02:56:08 +00:00
Brian Wilkerson
5c59f08857
Add more documentation to the server package
...
Change-Id: Id2413bc1f62ebc8ea42d3cac15adcb871c2cc234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254720
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-11 17:05:38 +00:00
Konstantin Shcheglov
82e33cc598
Add DartType.element2
...
Unfortunately my idea about checking for specific `DartType` subtype,
and only then asking for the element is too punitive. It almost
works in google3, but the amount and the kind of changes I had to
do make me realize that we should keep `get elementX` in `DartType`.
I guess this is the same as we had in AST when `get constructors`
does not make sense for mixins (?), but works for classes and enums,
and it is easier to pull it into the superclass.
Change-Id: Ibc4fac0b95d63748fa65de96d29300f477fdfc76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-11 16:01:48 +00:00
Brian Wilkerson
94d797ebee
Add a refactor command
...
The command name is a bit unfortunate in that it isn't very readable for
debugging purposes, but it has the advantage that there isn't any
opportunity for it to get out of sync. That might be the wrong thing to
optimize for. Let me know what you think.
Change-Id: Iec5c2ad9703f51c7702d4d5094f0548b48fbaafd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254321
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-10 22:52:41 +00:00
Sam Rawlins
e139fb1527
Tidy some lint issues in analyzer
...
* Move many identifiers from snake_case or SCREAMING_SNAKE_CASE to
camelCase. I think I restricted the changes to private API.
* Add an ignore in generated files for constant_identifier_names;
we often just mirror names found in YAML files or whatever, where
things are not necessarily named according to Effective Dart
standards.
* Avoid some implementation imports which I think were accidental.
* Use single quotes in some more places.
Bug: https://github.com/dart-lang/sdk/issues/48784
Change-Id: I439fe50cb9f8f8f5e9c74ce594aea15e394ee7da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-08-10 21:23:21 +00:00
Konstantin Shcheglov
f3d919308f
Use different marker file to identifier Blaze workspace.
...
Bug: https://github.com/dart-lang/sdk/issues/49629
Change-Id: I8f1496735373494745a79d502488a217e3c71223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-08-10 19:58:43 +00:00
Danny Tuppeny
61314e9588
[analysis_server] Fix flaky reanalyze tests
...
Change-Id: If6cef40f3215d6f826d72cad189de2ce5c677718
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253661
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-10 18:56:08 +00:00
Konstantin Shcheglov
43065920cc
Rename Bazel to Blaze - files, classes, methods.
...
No changes to implementation yet, we still look for both Blaze and Bazel.
Bug: https://github.com/dart-lang/sdk/issues/49629
Change-Id: Iaf1b1cc2c9a8cf28d8bbfb5541819a1f5c8a3de6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254343
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-10 16:00:18 +00:00
Konstantin Shcheglov
f4c009dc33
Deprecate Declaration.declaredElement, use 'declaredElement2' instead.
...
This is necessary to separate `ClassElement`, `EnumElement`, and `MixinElement`. And, in the future, augmentations like `ClassAugmentationElement`, etc.
Change-Id: Iecd2f8707212e53ef56f0e101880c7bab9e5d057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254104
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-09 17:26:06 +00:00
Brian Wilkerson
0a1793eb5d
Move the tests for legacy refactorings
...
This reflects the recent change to the implementation classes.
Change-Id: I0867a274c830d34f46c858713f0df511b7b811c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-09 04:22:42 +00:00
Brian Wilkerson
858b89a10b
Update the fix status of a couple of diagnostics
...
Change-Id: Ia62ee0f45db47895135427e019f1c558dee044fa
Closes: 49616
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254067
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-08-09 04:22:22 +00:00
Konstantin Shcheglov
75b8b916d6
Deprecate ClassOrMixinDeclaration, use ClassDeclaration or MixinDeclaration.
...
Change-Id: I23e292e9f7c4413edf9b068f057dd02794db21a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-08 21:40:40 +00:00
Brian Wilkerson
a4f21c8754
Add a capability for command parameters
...
Change-Id: Id52b323ebb16fbd90c19ee43704dff03dac92336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254060
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
2022-08-08 19:54:21 +00:00
Brian Wilkerson
bf4e7ade23
Re-organize the analysis server documentation
...
This is in preparation for adding new documentation.
Change-Id: Icf77b898d3e0b2c6ae0c71419e70ecd6248c86e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254002
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-08 16:55:30 +00:00
Konstantin Shcheglov
6e57418fd5
Roll latest linter, b677397483251d55ce1aec8d170be7720b53fe26
...
Change-Id: Ia4495bbf820a7df6ea7f86bbfca76c604a539af3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253903
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-08 04:20:10 +00:00
Brian Wilkerson
60773b9135
Rename two classes
...
Change-Id: I3fe6f0e4a4f3e8d04994a21c97e608fe8065e5ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253902
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-08 04:11:19 +00:00
Danny Tuppeny
139d150b23
[analysis_server] Remove use of SuggestionSets from LSP
...
Always use NotImportedContributor.
Change-Id: I3ed518f2d84d10600a5ea27bc88282762573ef2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253784
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-08-05 17:08:27 +00:00
Danny Tuppeny
30d7a0c5be
[analysis_server] Don't re-analyze on watch events for files that have overlays
...
Existing tests like `test_fileSystem_changeFile_hasOverlay_removeOverlay` verify that removing the overlay correctly re-reads content from disk.
Change-Id: I05660acfe81e35fd4b247d8c7b901903bb67f728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-05 16:55:37 +00:00
Konstantin Shcheglov
35413ac2b4
Deprecate getType(), use getClass() instead.
...
Change-Id: I58d25a5449dfc79b1d6a092e58268f7a612d378c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253708
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-08-05 05:25:17 +00:00
pq
c9750b2e4b
update analysis diagnostics page to look for packageConfig
...
Change-Id: I60e2e5f247ebf6baff25bbeebbe276cd135beb43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253607
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-08-04 19:54:06 +00:00
Konstantin Shcheglov
5458af8662
Deprecate ClassElement.isEnum/isMixin, use 'is EnumElement' instead.
...
Change-Id: I493fb048d0f7c8af778a35e4543df206cfd18739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-04 19:21:27 +00:00
Brian Wilkerson
b489c7f22e
An initial sketch of the new refactoring support
...
This is very incomplete at this point, but any feedback, including
feedback about the overall design, is very welcome. I added a
placeholder for a refactoring so that I could see what the design
implies in terms of the difficulty of adding a refactoring.
I expect that specific details will change a fair bit as we start to
write some concrete refactorings, so I'm more interested in problems
with the overall design, but any comments are, of course, welcome.
Change-Id: Id80741b60542bee31fd48a0655ef8650192b58a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253604
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-08-04 17:41:36 +00:00
Konstantin Shcheglov
cbfad8f802
Deprecate DartType.element, use specific element accessor for InterfaceType, TypeParameterType.
...
For `InterfaceType` keep `element2` deprecated and define
`InterfaceElement get element2` instead. Most changes are because
of this.
Change-Id: I13b888610fc707438c3c97b676f1460e7fc2b040
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253564
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-08-04 16:18:06 +00:00
Brian Wilkerson
22fe2d2a47
Move the legacy refactoring support into a legacy folder
...
There were no changes other than to move the files and update the imports
to match.
Change-Id: I0790d9bf7287d62756ad7534b760689489706d40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253602
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-08-03 21:37:26 +00:00
Konstantin Shcheglov
528836c4aa
Deprecate 'get enums/mixin', use 'get enums2/mixins2'.
...
Change-Id: I5c7dbb6dcc58537657e429893797b2631733ce16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252871
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-02 21:05:54 +00:00
Konstantin Shcheglov
71ef76ddfd
Deprecate Element.enclosingElement2, use 'enclosingElement3'.
...
Change-Id: I0aba589bd42648eb420051cbe04bb3ef435081e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-02 18:00:14 +00:00
Konstantin Shcheglov
01173e2aa2
Deprecate 'name' in AST, use 'name2' token instead.
...
Change-Id: I867f009dca12208f835199297d2ea85c203c8556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252566
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-02 16:25:34 +00:00
Brian Wilkerson
023c6df3b4
Initial draft of a custom LSP protocol for refactoring
...
Change-Id: Ib7a6b6bd0b2e0dccd8e7b6c117dc284b0e5a95cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253361
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
2022-08-02 15:48:04 +00:00
pq
85d91f95b9
migration to code_style_options
...
More migrations to code_style_options.
See: https://github.com/dart-lang/sdk/issues/49558
Change-Id: I8a2e8459ea9e02b9d65a219dad3ec73080001782
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252965
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-01 21:45:34 +00:00
Konstantin Shcheglov
2c54a11c23
Add 'FileResult.isAugmentation' and 'isLibrary'.
...
Change-Id: I862a21d5abdefce14ad48a1043d90f0a32fc6994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-01 21:07:44 +00:00
Konstantin Shcheglov
33b672f789
Use CatchClauseParameter instead of SimpleIdentifier.
...
Change-Id: Ib254d05954548d4101fef9c2545d18b2611b59dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253100
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-08-01 17:32:04 +00:00
Konstantin Shcheglov
5d64241186
Deprecate Configuration.uriSource, use 'resolvedUri'.
...
Change-Id: I49bf3458341161173bbd44c2e18931277d6dcd3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-08-01 16:50:44 +00:00
Konstantin Shcheglov
fd0d3b2546
Use named parameters for ResultImpl constructors.
...
Change-Id: I93bc4738259257b2a0326dc259c43693da5754c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-31 23:00:53 +00:00
Konstantin Shcheglov
d5ea4c0fdc
Revert "Deprecate ClassElement.isValidMixin"
...
This reverts commit da31cab154
.
Reason for revert: I agree to some extent that this method can be useful.
Original change's description:
> Deprecate ClassElement.isValidMixin
>
> Change-Id: I0cc8245b20e2cbe3c201263207f8570a46d6ab15
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253026
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
TBR=scheglov@google.com ,brianwilkerson@google.com,srawlins@google.com
Change-Id: Ibee8b6260ff8268f9e9f2f05b54c8256febb19d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253120
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-30 19:48:13 +00:00
Konstantin Shcheglov
5f96a8c7fb
Deprecate disjoined 'uriX' properties in favor of 'DirectiveUri'.
...
Change-Id: I6414f7e0f041a7a4454564195b2582e643f01b7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253024
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-30 19:39:42 +00:00
Konstantin Shcheglov
d8d2fbd031
Deprecate ClassElement.hasStaticMember
...
Change-Id: I29861d36098172b25498db2f0841736358e4b796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253025
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-30 04:26:21 +00:00
Konstantin Shcheglov
da31cab154
Deprecate ClassElement.isValidMixin
...
Change-Id: I0cc8245b20e2cbe3c201263207f8570a46d6ab15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253026
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-30 00:36:32 +00:00
Brian Wilkerson
b7edb69e97
Reorganize the snippets support
...
Moves multiple classes into their own files. Renames several classes and
the associated test classes. Moves a few of those classes (files) into
the parent directory. Converts snippets to use constructor tear-offs
rather than static method tear-offs.
Change-Id: If1aae3cc468d20ef056e650c0206fcfbf3c94f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253004
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-29 14:38:41 +00:00
pq
1f02320791
use codestyle options (rather than lint enablement)
...
Related to: https://github.com/dart-lang/sdk/issues/49558
Change-Id: Iac37649d58be88d7d26db179ac6b48958b0c1701
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-07-29 01:05:51 +00:00
pq
02a8d42261
use-super-parameters when use_super_parameters is enabled
...
Fixes: https://github.com/dart-lang/sdk/issues/49556
Change-Id: Ia22a4f2734b7dd3affe8984ea41984e5b2c263a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252961
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-29 00:23:31 +00:00
Danny Tuppeny
dfe2463517
[analysis_server] Don't include prefixed type names in Outgoing Calls
...
Change-Id: Ic305706bf8fcb224c757b85379e69afa5ac8d102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-28 18:06:30 +00:00
pq
eed97d8778
(conditionally) add trailing commas for wrapping streambuilders
...
Related to: https://github.com/dart-lang/sdk/issues/49541
Change-Id: Iba6ce96c12838ad23c035aca64dda233803fac32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252866
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-07-27 22:48:39 +00:00
pq
933a3cbaf2
wrap with builder: add trailing comma if require_trailing_commas
is enabled
...
Fixes: https://github.com/dart-lang/sdk/issues/49541
Change-Id: I616919c8f951648431f34646f88abe260af69424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-07-27 21:50:19 +00:00
Sam Rawlins
70e2d3d6e7
[analysis_server] Evaluate a few fixes
...
* I manually edited the counts. They seemed to have drifted...
* I flipped 4 diagnostics to "noFix" with notes.
* I flipped 9 diagnostics to "needsFix" with notes.
I didn't use a _lot_ of rhyme or reason, or even method to my madness;
I more or less gut-checked each of these.
I also didn't have a lot of rhyme or reason to the ones I picked except
they are alphabetically near each other.
This is sort of an experiment in spending 10 minutes "evaluating"
possible fixes, to get down the huge "needsEvaluation" count.
Change-Id: I32c9f86058c54b97e68f5e9182e3ff827ec4eb48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2022-07-27 18:55:08 +00:00
Konstantin Shcheglov
a8be1c1e0b
Deprecate Directive.element, use element2.
...
Change-Id: Ic18f9c579bcec0b6406070da04b476be2582a504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-26 18:51:47 +00:00
Sam Rawlins
0cc284a083
Nit tweaks in LSP Analysis Server
...
Change-Id: I8f1dee82486f357dcfc64294852ea02d23b9e8a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-26 18:11:37 +00:00
Konstantin Shcheglov
4359108a8b
Deprecate ClassOrMixinDeclaration.getField/getMethod
...
Change-Id: I312a1214b0babb03a3208dcf306753e0d75f77e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252705
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-26 16:54:27 +00:00
Konstantin Shcheglov
a31337548e
Deprecate ClassDeclaration/ClassTypeAlias.isAbstract
...
Change-Id: I70fa1714fb31bb611d86054fc4538c01afda6763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2022-07-26 01:51:27 +00:00
Sam Rawlins
7280525117
Implement mustBeOverridden annotation and enforcement
...
Fixes https://github.com/dart-lang/sdk/issues/30175
Fixes https://github.com/dart-lang/sdk/issues/28250
Change-Id: Id9c62448da9ade81258c2ae2355d05117057a8f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-07-25 22:17:18 +00:00
Brian Wilkerson
9312ba0abc
Fix rename_to_camel_case to handle screaming caps
...
Change-Id: I04564db1c4f47be18949cf16dcf42230db0da6e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252562
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-07-25 16:08:23 +00:00
Ahmed Ashour
296f114d77
[analysis_server] link failing test to an issue
...
Part of #49514
Change-Id: Ie74a149b998a5901c6f1ad2a389403165167aa83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252582
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-25 16:00:19 +00:00
Anis Alibegić
40e18905f2
Fixed various typos in a lot of files
...
Closes https://github.com/dart-lang/sdk/pull/49478
TEST=Manual
GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Brian Wilkerson
56dc3e360a
Fix the convert_to_contains fix to remove the second argument
...
Change-Id: I2da6b71909dd5ecf725714fb51cd075498712c1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-23 14:58:07 +00:00
Ahmed Ashour
eefbe1fd14
[analysis_server] add fix for ASSERT_IN_REDIRECTING_CONSTRUCTOR
...
Fixes #49486
Change-Id: Ic96d2b347578f574eb67b12ef3dbbddcd9c04d2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-21 22:16:06 +00:00
Ahmed Ashour
a9ba31a5b2
[analysis_server] add fixes for ABSTRACT_FIELD_INITIALIZER
...
Fixes #49488
Change-Id: I48caabef2c038b95ef88cad903fdead47b91c615
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252081
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-21 21:30:26 +00:00
Danny Tuppeny
055774958d
[anaysis_server] Cancel in-progress LSP completion requests if another arrives
...
Change-Id: Idf49b70750a3427529f71e952aa036fae4c7c6cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252422
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-21 17:40:06 +00:00
Danny Tuppeny
5741f11f7b
[analysis_server] Remove unnecessary imports when organizing imports
...
Change-Id: I7a39a9b07adbacc7d3fd5abb3b165b47668e7938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-21 15:10:55 +00:00
Danny Tuppeny
71e2aee8a5
[analysis_server] Disallow extract method on all prefixes
...
Change-Id: I63ecfab4fad63797358dc2cfb7d5cf79ca444dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-21 14:57:26 +00:00
Danny Tuppeny
0add39a68e
[analysis_server] Skip analysis work when overlays are created if content matches previous content-
...
May prevent https://github.com/dart-lang/sdk/issues/48051 from occurring since we will no longer call driver.changeFile() for SDK libraries being opened, although it does not resolve the underlying issue.
Change-Id: I5ca53a04842348a584ccc824aaf90ba7f230c002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251980
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-07-20 22:45:15 +00:00
Danny Tuppeny
210af2940f
[analysis_server] Fix loss of comments containing newlines when sorting imports
...
Change-Id: Ie264c16d4ec8254ba0394691625a161598e73f5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-20 21:23:55 +00:00
Danny Tuppeny
1d49366927
[analysis_server] Simplify ImportOrganizer to use a single range for each directive
...
This should be a no-op and existing tests pass. This is a step towards extracting code that computes a range for removing/sorting directives that could be used elsewhere such as the RemoveUnusedImport() fix.
Change-Id: Ib43b57bb1e34b817cb3771b60c65ad9ba2fe2919
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-20 19:44:35 +00:00
Danny Tuppeny
720f7bea37
[analysis_server] Fix assist test on Windows
...
Change-Id: I2a85c699140c2fd31ee03524fd2ecac6a0482540
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-20 18:48:45 +00:00
Konstantin Shcheglov
21d0028643
Resolve augmentation import directives in libraries.
...
Change-Id: I900d262df4b32698e20907a3bb99e88fbee38d3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252006
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-20 17:08:58 +00:00
Ahmed Ashour
157e407450
[analysis_server] don't offer fix when the error in "cannot-ignore"
...
Fixes #49464
Change-Id: I9f9f40e5a47604fa422a223f5c54fef3d045a074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-20 17:02:25 +00:00
Danny Tuppeny
019cfb998d
[analysis_server] Handle errors from temporary watchers during rebuilds and restart rebuild
...
Fixes https://github.com/dart-lang/sdk/issues/49286 .
Change-Id: Id60111e381f75aaf488dc4b80412242e113f3b59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-20 16:35:34 +00:00
Danny Tuppeny
2c6876aa47
[analysis_server] Fix CompletionBudget to start with the completion request
...
Change-Id: Iaa9f84394dce36b65a3f5e25dbb381449deb7ea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-19 18:19:04 +00:00
Ahmed Ashour
5459fc133f
[analysis_server] associate DEFAULT_VALUE_ON_REQUIRED_PARAMETER
with RemoveDefaultValue
...
Fixes #47540
Change-Id: I8fa50933f2a7fadf6b11df2b6c385a759f36a8c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251940
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-19 17:58:22 +00:00
Konstantin Shcheglov
2f3269faa1
Deprecate 'Element.enclosingElement', switch to enclosingElement2.
...
We need this for:
1. CompilationUnitElement changes its enclosing element from LibraryElement to LibraryOrAugmentationElement
2. Similarly PrefixElement.
Change-Id: I5e3719b4ef59d03caab1b20c9172a8c0fd786bdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251900
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-19 15:44:14 +00:00
Ahmed Ashour
09680ec704
[analysis_server] associate INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD
with ChangeTo
...
Fixes #49058
Change-Id: Ie064f0155269282b6c8fa4208f9881ed307c0421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-19 04:57:35 +00:00
Danny Tuppeny
89e9801103
[analysis_server] Fix isIncomplete flag for LSP completion when budget is exhausted
...
Change-Id: I1cc2ec9e3688383008d0eefc44ec7b94f858c5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251768
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-18 21:22:05 +00:00
Konstantin Shcheglov
e23101a16f
Rename to LibraryImportElement, LibraryExportElement.
...
Change-Id: I0928ca5522d9c67142111a8f3a7eb4d84f114f56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251844
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-07-18 20:01:18 +00:00
Konstantin Shcheglov
eddd4f4427
Renames for FileState kinds / directives.
...
Change-Id: Ia024eb8922b06a0bdb37321f76a7527dc7e3c117
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251740
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-18 17:20:33 +00:00
Danny Tuppeny
6bbe04d40f
[analysis_server] Set selection/selectionLength for Flutter "Wrap with X" widgets
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/4061 .
Change-Id: I41b54c2641a0eed29e500e1bcc90f9e3945f4f7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251766
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-18 16:28:27 +00:00
Ahmed Ashour
e34c84a4fc
[analysis_server] associate DEFAULT_VALUE_ON_REQUIRED_PARAMETER
with RemoveRequired
...
Part of #47540
Change-Id: Iff1e81a2809ce045dc6dfb9b9567ad934400308e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251761
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-18 16:05:23 +00:00
Konstantin Shcheglov
2e86c1f018
Deprecate AnalysisDriver.dispose(), use dispose2() instead.
...
Change-Id: Icfb46bf83f3a1f5828efd76eab1014c4dee0e088
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251587
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-15 17:15:40 +00:00
Danny Tuppeny
0482fa6fb3
[analysis_server] Don't 'await' between calling function and using expect(throwsA)
...
This introduces a race where if the function throws before `expect(throwsA)` adds a handler, it becomes an unhandled exception.
Fixes https://github.com/dart-lang/sdk/issues/49455 .
Change-Id: I81205f272c9ec211b99bf73af64dab8e4d774e84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251550
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-15 15:40:40 +00:00
Jaime Wren
d61562d765
Extend the LSP Analysis Server support to include the DetachableFileSystemManager support
...
The DetachableFileSystemManager API also changes slightly with this change resolving a TODO.
Change-Id: I388b352c987e6c96f95fcabd9a532cbfcfa39e4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2022-07-14 21:10:39 +00:00
Danny Tuppeny
0213854523
[analysis_server] Don't provide commit characters on every completion item when enabled
...
Setting commit characters on the registration is now enough to apply to all items (see https://github.com/microsoft/vscode-languageserver-node/issues/673 ).
Change-Id: I1133005773e63f563d4e303af60f6c5bb56ec826
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251546
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-14 20:11:59 +00:00
Danny Tuppeny
57a3598b2b
[analysis_server] Check Call Hierarchy target is still valid before returning calls
...
Change-Id: I7d915700dd323381adab4d3bd22d5fb384c6de00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251540
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-14 14:29:54 +00:00
Danny Tuppeny
f34d4d5f93
[analysis_server] Add support for LSP Call Hierarchy
...
Fixes https://github.com/Dart-Code/Dart-Code/issues/612 .
Change-Id: Ic51d4be2340317443b5a1cdae83e6eeaac4fa06b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-13 18:45:03 +00:00
Danny Tuppeny
f0d3e1dd90
[analysis_server] Enable unawaited_futures lint and fix remaining violations
...
Change-Id: I44b56ba8e1bd9ed5ba3d85006eb5d615e5a2c9d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251461
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-13 18:40:53 +00:00
Ahmed Ashour
b3df7ce795
[analyzer] remove BulkFixProcessor.fixOfTypeInUnit
...
Fixes #49406
Change-Id: Ib755f918f91ceca1ac4c282e18a9eab9224882e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250746
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-13 16:05:13 +00:00
Danny Tuppeny
4bafe2233c
[analysis_server] Has containerName to Call Hierarchy items
...
Change-Id: Ic39900ef0ef80b721eae645d1e7e1aa7b5b03661
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-13 14:22:53 +00:00
Ahmed Ashour
0813000fe4
[analysis_server] associate RemoveAbstract
with ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER
...
Fixes #49365
Change-Id: Ibb0b2b3a0431e6c2770a214045fd94788c85f62b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-13 14:20:33 +00:00
Ahmed Ashour
565a52571d
[analysis_server] associate RemoveInitializer
with ABSTRACT_FIELD_CONSTRUCTOR_INITIALIZER
...
Part of #49365
Change-Id: Icf4ef0fb89cbc514587b39bbe10a4d394290499a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-07-13 04:50:42 +00:00