Commit Graph

1113 Commits

Author SHA1 Message Date
FMorschel 652a419fdb [DAS] Fixes completion for collection ifs and fors
Fixes: https://github.com/dart-lang/sdk/issues/60604
Change-Id: I55a8426ae54a92fb26fd5a04e3dc11c267c26acf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428940
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-19 09:19:49 -07:00
FMorschel ade4bf824a [DAS] Fixes record extension field completion
Bug: https://github.com/dart-lang/sdk/issues/60625
Change-Id: I23e4a5a85dc15059c9b1e658fb2fc3f868fa91a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-05-16 13:43:09 -07:00
Sam Rawlins bd700772ff analyzer: move testing utilities to analyzer_testing package
Work towards https://github.com/dart-lang/sdk/issues/55660

Change-Id: Iae062d95e5cf3b94b540496242b3627268ac2612
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428844
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-05-15 16:28:50 -07:00
FMorschel 9dd284ebf2 [DAS] Fixes comment references completion outside braces
Fixes: https://github.com/Dart-Code/Dart-Code/issues/5507
Change-Id: Icd83264a3d31118c4ee837e2dd2303fd1e10b42a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427460
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-13 11:21:14 -07:00
Sam Rawlins 3021cc4913 analyzer: Move PackageConfigFileBuilder to public API.
Work towards https://github.com/dart-lang/sdk/issues/55660

Change-Id: I3df2cd374f6b3ef9e027f0e07c748be6ea21ebb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427586
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-05-09 10:57:55 -07:00
FMorschel a26d653b9f [DAS] Fixes keywords suggestion for patterns
Bug: https://github.com/dart-lang/sdk/issues/59854
Change-Id: I4e3b3ca51e08ea63e9516d6b1fca88f75895ade6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417143
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-05-02 11:56:21 -07:00
Konstantin Shcheglov 7498555a16 Completion. Fix for NPE when complete at the start of a DartDoc.
Bug: https://buganizer.corp.google.com/issues/414299463
Change-Id: I70d38a825b5b8eb3d9e3ce0a0dbbe95ea6e5774f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-28 09:04:07 -07:00
FMorschel e43a6b252e [DAS] Fixes completion suggestion for setter based on inheritance
R=scheglov@google.com

Bug: https://github.com/dart-lang/sdk/issues/60298
Change-Id: I43b89744c74bd3bbfc664a505c0fc4d05cc87f5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-04-25 17:24:25 -07:00
FMorschel 47d29ca4ba [DAS] Fixes types and keyword suggestions on named parameters
Fixes: https://github.com/dart-lang/sdk/issues/60550
Change-Id: Ie1f116387483c47f48b90cd6353481b06d93321e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/422903
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-04-22 12:31:04 -07:00
Danny Tuppeny 59587b0e27 [analysis_server] Enable test newline normalization by default
+ fix several failing tests with this enabled.

See https://github.com/dart-lang/sdk/issues/60234

Change-Id: Ie71e1655bf2ab8ac651bfcf803884741863b42c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423801
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-22 10:23:12 -07:00
Danny Tuppeny 226ec8413e [analysis_server] Pre-emptively opt some tests out of newline normalization
Currently newline normalization is opt-in for server tests because there are many tests that fail when the newlines are normalized to the current platform. This change pre-emptively opts-out a number of tests that fail so that the default can be flipped, and then these tests could be worked through.

See https://github.com/dart-lang/sdk/issues/60234

Change-Id: I19f5121612fbc9da18ad0edbe631549e04553e6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423800
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-22 10:21:00 -07:00
Sam Rawlins 5eef8e4ebe analyzer etc: move analysisOptionsContent function to be shared
This function was defined once in analyzer testing code, once in
linter testing code, and once in analysis_server testing code. In this
change, all three are combined into one function in analyzer_utilities.

Change-Id: Ib2daa7b3d14aae6ca2aa09f6f9bdeaf76bc72d10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423068
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-04-21 13:01:36 -07:00
FMorschel 9fbed46b13 [DAS] Removes operators suggestions from . access and more considerations from extension suggestions
Fixes: https://github.com/dart-lang/sdk/issues/60118
Change-Id: Ibd8399349a3bd82615083f46c3d506fafff20101
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417400
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 09:43:35 -07:00
FMorschel 42394e5874 [DAS] Better docs auto-complete with extensions and typedefs
Fixes: https://github.com/dart-lang/sdk/issues/60423
Change-Id: I0907a52a0c7787adc3de21c82bb60aced8263d2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/419422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-04-01 16:29:10 -07:00
Sam Rawlins d3adf41b9a DAS: reformat
Recently a bug was fixed in the formatter, regarding how declarations
preceded by an end-of-line comment are formatted. Good to just bundle
the formatting changes into one CL.

Change-Id: Ieab8ec3263932505f8b8da77fbe637dffc61b46d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-03-20 09:18:54 -07:00
FMorschel f276d3c65b [cq] Using TestCode and normalizeSource for quick-fix tests
This change introduces `TestCode` and `normalizeSource` into the tests for quick fixes. The goal is to add these capabilities to `AbstractSingleUnitTest`, allowing a future update to replace offsets in tests with markers.

Bug: https://github.com/dart-lang/sdk/issues/60234
Change-Id: I760e6b5fb13b37d4e35278073a78f4d755deda64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415260
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-03-19 17:35:20 -07:00
Brian Wilkerson 42bdd6071f Add support for a zero-length marker in test code
Change-Id: I44642ecbb09d8fc2c3b86400f5d388c74d6fb3d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-03-19 12:18:40 -07:00
Brian Wilkerson 38d8834c07 [cq] Reduce assignments to testCode to 1
The purpose for this change is to make it easier to use `TestCode` to
parse the code under test. This, in turn, will allow us to use the same
markdown in all of our test code, making it easier to write and read
our tests. This biggest blocker to that goal is the fact that we assign
to `testCode` in several places, and that's the problem solved by this
change.

Change-Id: Id88463925587ff0839fe75faf6a1d083a1b3320c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415700
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-03-15 07:34:29 -07:00
Brian Wilkerson 2aa14dbe98 [cq] Convert some uses of a comment marker to use TestCode
There are a couple of other places where this older convention is still
being used, and I hope to clean them up as well.

Change-Id: I84d7e8d81778b6b7b69060df6eda5db2a6aaf256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414161
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-03-07 10:15:59 -08:00
FMorschel b8dbdda316 [DAS] Fixes instance members completion on dart docs
R=keertip@google.com

Fixes: https://github.com/dart-lang/sdk/issues/59724
Change-Id: I1e80e62e553c5411ee69d58dbe941b61bc575a81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411361
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-03-05 09:49:58 -08:00
Keerti Parthasarathy b251a6f8e4 Add a completion test to verify scoping rules.
Change-Id: I4b210b9d48007812a04053f43650ac894543b5da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-03-05 07:33:57 -08:00
FMorschel c083f5ae06 [DAS] Fixes import and library doc comments. Adds missing enum test
R=srawlins@google.com

Bug: https://github.com/dart-lang/sdk/issues/59724
Change-Id: I580b39acc96697990b12527aea699cdf09d788e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411360
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-26 07:20:29 -08:00
FMorschel 1d4ebf7594 [DAS] Fixes extension and typedef dart docs
R=srawlins@google.com

Bug: https://github.com/dart-lang/sdk/issues/59724
Change-Id: I9a4a7390e71b1e1fd2daa0f3e548f28cd34834cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-02-25 07:57:12 -08:00
FMorschel bbb4a1b4e7 [DAS] Adds base tests for auto-complete on dart docs
R=srawlins@google.com

Bug: https://github.com/dart-lang/sdk/issues/59724
Change-Id: Ia2345c77371a58ad0be402daa93642a3f0e53dc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/410461
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-02-21 07:57:09 -08:00
Keerti Parthasarathy 0246cc613f [Completion] Show enum constants when completion is in the declaration.
Fixes https://github.com/dart-lang/sdk/issues/56971

Change-Id: Ib33a58e774f5540c426f5d5ffb7a387414dcf9f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/408600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-02-09 22:41:31 -08:00
Konstantin Shcheglov 6e17841614 Macro. Remove tests from analyzer/ and analysis_server/.
Change-Id: Iabe04d7ff8fe0cc9b605d0c18fd47591fd02d6bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406681
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-29 14:58:19 -08:00
FMorschel a0db69f182 [DAS] Considers factory keyword on constructors auto-complete
R=keertip@google.com

Fixes https://github.com/dart-lang/sdk/issues/59896

Change-Id: I47c51bc521f97398ae19a8d124e836baadfdabd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405200
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-01-24 08:45:46 -08:00
Keerti Parthasarathy c7d0e325d7 [Elements.migrate] Migrate CandidateSuggestion.
Change-Id: I664ab34e7c674582d98f3c75d3fffe41d8cf8be5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-19 18:14:27 +00:00
Jens Johansen a0c4efddb8 [parser] Don't try to parse a function literal when in a continuation
Fixes https://github.com/dart-lang/sdk/issues/49477

Change-Id: Ie290a1af08ecc5c2cd270af21adeb43943ec289b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-11-12 08:16:42 +00:00
Brian Wilkerson 365941b268 Document some lint diagnostics
Change-Id: I38ba6f77a7d25e3f4716c2b2432b790c973c5650
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390303
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-11-08 00:49:18 +00:00
Sam Rawlins 73443c8603 DAS: Generated protocol 'enums' can be real enums
File sizes are reduced:

```
analysis_server_client's protocol_common.dart    - 132k -> 102k (-23%)
analysis_server_client's protocol_generated.dart - 453k -> 433k (- 4%)
analysis_server's        protocol_generated.dart - 528k -> 509k (- 3%)
analyzer_plugin's        protocol_common.dart    - 139k -> 108k (-22%)
```

Change-Id: I8018f1d09e053c9d3df340ba31cdb07cbd29acf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-07 17:27:18 +00:00
FMorschel 309ba3bd0f [DAS] Fixes keyword completion inside map literal value
R=brianwilkerson@google.com

Fixes https://github.com/dart-lang/sdk/issues/57032

Change-Id: I4703fdafc7986d20a40a18b729a4c66eaafff87a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-11-07 15:17:29 +00:00
Sam Rawlins fbf331e0dd DAS: reformat source code with tall-style
Change-Id: I42b4a44fd6a2197e499e8623274b3cd1a4b5556f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394003
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 23:04:00 +00:00
Chloe Stefantsova 8a1c0203b4 [analyzer] Handle null-aware elements in code completion
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: Id02c049d0afb5cb6c3f1d94ee5bebf7ca532e2e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392902
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-05 10:57:28 +00:00
Parker Lougheed a409a1c07d [analyzer/linter] Use shared enumeration for lint names
This helps to avoid any accidental mispellings, enables find usages, and potentially makes future renames easier.

The primary goal is to make future work in https://github.com/dart-lang/sdk/issues/56835 easier.

Change-Id: I684630a4d6cb145031de0dabc221f247246ea00c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-10-03 21:36:49 +00:00
Konstantin Shcheglov 4fe2944776 Parts. Consider 'part' of 'part of lib.name' as an error.
Maybe? https://github.com/dart-lang/co19/issues/2907

Change-Id: If64ba74bf8d3ad3f5e1b926f19705ae469c76a5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-02 18:16:14 +00:00
Konstantin Shcheglov c58d9319be Completion. Issue 56783. Suggest non-assignable members when not in LHS of assignment.
Bug: https://github.com/dart-lang/sdk/issues/56783
Change-Id: I5e190bd0ebf59e5771d394eb5a72600d40a02a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386683
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-09-27 17:55:31 +00:00
Sam Rawlins f84a81002c linter rules: tidy up test support
Just little things:

* Convert the class AnalysisOptionsFileConfig and it's `toContent`
  method into a single function.
* Convert the class PubspecYamlFileConfig and it's `toContent` method
  into a single function.
* Privatize ExpectedDiagnostic fields `diagnosticMatcher`, `offset`,
  `length`, `messageContains`,
  ExpectedError field `codes`,
  ExpectedLint field `lintName`,
  LintRuleTest field `collectionIncludedPaths`,
  _ContextResolutionTest field `sdkRoot`.
* Privatize `writeTestPackageAnalysisOptionsFile` and
  `writeTestPackagePubspecYamlFile`
* Start doc comments with a single-sentence summary (https://dart.dev/effective-dart/documentation#do-start-doc-comments-with-a-single-sentence-summary and https://dart.dev/effective-dart/documentation#do-separate-the-first-sentence-of-a-doc-comment-into-its-own-paragraph)
* Document with third-person verbs (https://dart.dev/effective-dart/documentation#prefer-starting-function-or-method-comments-with-third-person-verbs)

Change-Id: I7d584810cd339f8184fe14c3151b55988bf2cfff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-09-26 14:33:04 +00:00
Danny Tuppeny 80057b98d2 [analysis_server] Take prefixes into account when determining the visibility of completions
A prefixed identifier like `a.Foo` should not hide a prefixed identifier like `b.Foo` not an unprefixed identifier (and vice-versa).

Fixes https://github.com/Dart-Code/Dart-Code/issues/5242

Change-Id: I8be8b3260f2a9f4333d38bba7ffe309cd3817932
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-09-09 14:42:29 +00:00
Fedor Shcheglov a5cfca1b48 Issue 56572. Fix suggesting extension methods on record types.
Bug: https://github.com/dart-lang/sdk/issues/56572
Change-Id: I47e4b07270843ffb53ab90963e04f01b3b105043
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-08-26 21:18:56 +00:00
pq 6413386f29 [wildcards] improve _ type param handling
See: https://github.com/dart-lang/sdk/issues/56361

Change-Id: Ic3be09014afc095490d9332bd124843b5a65e1cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/381385
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-20 17:07:33 +00:00
Konstantin Shcheglov 4cea10fbf0 Parts. Report PART_OF_NAME when Feature.enhanced_parts is enabled.
Change-Id: I85925218b37a7cb65a7b50da6cc968155fd4789e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380043
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-12 20:11:06 +00:00
pq 4ec57e26b6 [wildcards] catch clause completion tests
See: https://github.com/dart-lang/sdk/issues/56361

Change-Id: I681e3b5ebfd2dcce3f377b8d45a492d44bf058a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378569
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-02 22:32:14 +00:00
pq 3b09a49ce5 [wildcards] ensure bound __ underscores are suggested in completions
See: https://github.com/dart-lang/sdk/issues/56361

Change-Id: Ia1b1a0fef17fb68f476d2ade96a0b5761152336b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-02 17:17:59 +00:00
pq 6b16fab819 [wildcards] completion suggestion support
See: https://github.com/dart-lang/sdk/issues/56361

To follow, a bunch of tests to make sure `__`, `___`, etc are not incorrectly getting special cased.

Change-Id: I3d35a5344e09011460c074fdd43eccdac452a8ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-08-02 14:51:14 +00:00
pq 60c0933f34 [wildcards] completion tests
See: https://github.com/dart-lang/sdk/issues/56361

Change-Id: Ib69a64b17a890c6cec0e1bddfd25f6fa7834b1cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378620
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-08-01 21:21:39 +00:00
Konstantin Shcheglov 4475e6ca7a CQ. Use shared ByteStore for ContextResolutionTest (legacy).
Specifically this speeds up code completion tests.
Before: 4m40.792s
After:  3m16.520s

So, 84 seconds faster :-)

Change-Id: I75194ecf9a622c108ddb8913337b9137fd9edee2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-07-23 23:34:11 +00:00
Danny Tuppeny 96a7c6ab24 [analysis_server] Fix context type for function expressions with implicit returns
Fixes https://github.com/Dart-Code/Dart-Code/issues/5162

Change-Id: I86148b3d847fc2a743307703390ff98c93b4c142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/374600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-07-10 14:46:49 +00:00
Brian Wilkerson 8b8a15059c Improve completion at the beginning of an index expression
This is almost identical to the fix for completing at the beginning of a
method invocation. There's probably a more consistent way to do this,
but I'm not sure what that is at the moment. (I think we used to do this
in `completionNode` but were skipping some nodes we shouldn't have been.)

Change-Id: I3f220e0e79a91721b0c1235fdfc0f511ee7400a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373902
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 16:32:40 +00:00
Keerti Parthasarathy 9f27bdeaf6 Use completionLocation from SuggestionCollector when computing relevance
Change-Id: I2446b8596ce35f53f6370b3a3590e7fd2a2b4974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373767
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-07-01 16:51:27 +00:00