117 Commits

Author SHA1 Message Date
Paul Berry afcfbbeba8 Migrate developer experience packages to new constructor decl syntax.
(Part of https://github.com/dart-lang/sdk/issues/63288)

This change migrates the packages owned by the developer experience
team to use the new constructor declaration syntax, described in
https://github.com/dart-lang/language/blob/main/accepted/future-releases/primary-constructors/feature-specification.md#abbreviations-of-in-body-constructor-declarations.

This change was performed in an automated fashion, by (a) bumping the
packages' SDK constraints to `3.13.0-0`, (b) enabling the lints
`unnecessary_type_name_in_constructor` and
`unnecessary_const_in_enum_constructor`, (c) fixing the resulting lint
failures using `dart fix`, and then (d) reformatting the affected
files.

To ease code review, I've reverted unrelated formatting changes.

Since this change requires bumping SDK constaints to `3.13.0-0`, it
was only performed on packages that are *not* published on
pub. (Packages that *are* published on pub should remain on lower
language versions until at least after the stable version of 3.13 is
released, so that we don't block users on the stable channel from
receiving updates to those packages.)

Change-Id: Ibb4daebafd239da58251e838ea6a3f336a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/505046
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
SLSA-Policy-Verified: SLSA Policy Verification Service <devtools-gerritcodereview-exitgate@google.com>
2026-05-27 14:52:58 -07:00
Sam Rawlins 6910a34b0a DAS: Correct calculations of whether an element is deprecated
I missed examining these use cases when I introduced the other
Deprecated constructors. But this leads to some UI bugs (like hover and
suggestions showing strikethrough) and relevance bugs in DAS.

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

Change-Id: Ief71c4d70d57f989aaf5c2d7159f418d706d6a03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462742
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-11-18 13:22:11 -08:00
Sam Rawlins 68d44b88c1 DAS: Make many protocol constants lowerCamelCase
Change-Id: Ibe3ae38d2afe00a125ed43034625924d4e989755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461241
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-11-12 09:14:29 -08:00
Danny Tuppeny 893932d610 Remove useLineEndingsForPlatform flag
Nothing ever sets this flag, it was left over from moving tests over to use normalization by default.

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

Change-Id: I4a657838f488f73e09c898c89ccb33885d47cf79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-11-04 08:09:40 -08:00
FMorschel 5825a34da3 [DAS] Fixes regression in completion for unnamed parameters in closures
Fixes: https://github.com/dart-lang/sdk/issues/61518
Change-Id: Ia190a35188d2e9cf67fd7a6e75580cbcf2f9c6a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-10-28 13:57:39 -07:00
Danny Tuppeny 5a85b72f1b [analysis_server] Enable line ending normalization in completion tests
See https://github.com/dart-lang/sdk/issues/60234

Change-Id: I8d0bf709c05dfbc54f94e939599b75aebd0f09ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453520
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-10 07:42:56 -07:00
Danny Tuppeny 6dac72652a [analysis_server] Update some more tests to handle EOL normalization
This sets `useLineEndingsForPlatform=true` for basic completion tests that now pass, but leave it set to `false` in `AbstractCompletionDriverTest` for now because there are a large number of failures in other tests that use that base class due to hard-coded offsets.

It also updates the format tests to support this (plus extracts some helpers to reduce the duplication).

Change-Id: Id2a0323b4605761d05e30bee89f7dccebb1f48c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/451020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2025-09-23 09:46:19 -07:00
Danny Tuppeny 6be105bb24 [analysis_server] Normalize test sources in base class
This adds code to normalize file contents in `PubPackageAnalysisServerTest.newFile()` so all tests using this base class normalize their source newlines by default (this ensures we run with \r\n on Windows, regardless of the git settings always using \n in this repo).

A flag `useLineEndingsForPlatform` allows option out of this, and any tests that currently fail in this mode set this in their setUp - with the exception of a few that were just trivial fixes.

This will make it easier to fix the remaining tests (by looking at code that does `useLineEndingsForPlatform = false`, deleting it, then fixing those tests).

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

Change-Id: If05bc5f7fe3007151c1290831157b6a62d6bf651
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449880
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-09-16 19:37:19 -07:00
FMorschel ebed8dd0e7 [DAS] Fixes todo of using computeSuggestions instead of addTestFile
Change-Id: I5acd99d8a6e27d65db77f69d88f2610f3503679e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/442726
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-07-31 15:48:01 -07:00
Danny Tuppeny 216eb0bef0 [analysis_server] Migrate some tests from indexOf() to TestCode.parse()
See https://github.com/dart-lang/sdk/issues/60234

Change-Id: Ia5c110b40088982368512688195d70c2b51a2d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/421121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2025-04-08 09:59:44 -07:00
pq 092728e8b5 [CQ] [server] anticipate strict_top_level_inference
Related to https://dart-review.googlesource.com/c/sdk/+/412383

(Note: presubmit required some re-formatting 🤷)


Change-Id: Ib18c7c1c1fceaa0007d804fbcb6397055242fa42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
2025-02-26 17:55:13 -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
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
Danny Tuppeny b1e740f316 [analysis_server] Migrate Overrides + DocumentationComputer
`DocumentComputer` currently makes use of `asElement2` to allow callers to still pass `Element`s so they can be migrated in separate CLs.

Change-Id: I44c49782498899d377defb90a8cd3813288c169e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391662
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-10-28 15:59:24 +00:00
Danny Tuppeny 916272331b [analysis_server] Remove the singleton uriConverter and pass explicitly to all toJson/fromJson methods
This avoids accidentally using the converter when talking to plugins, (at least for now) URIs are never expected, and file paths should always be used regardless of which mode the server is in.

This unfortunately touches a _lot_ of code, so I've pushed in many separate patch sets to Gerrit.

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

Change-Id: I312c3e2cbc35a05a078aaa0138aec7288b3c7dd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373745
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-07-02 14:15:11 +00:00
Konstantin Shcheglov 5c07c89a35 Enable 'unnecessary_final' in analysis_server/.
Change-Id: I71ee934b915d4aff924cf5925f87bcc9adc6c015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-04-16 20:04:15 +00:00
Konstantin Shcheglov f353f03240 Completion. Print (sometimes) the location. Fixes for ObjectPattern_type.
As proposed in https://dart-review.googlesource.com/c/sdk/+/356641

Change-Id: If196709976b0fa06492f360d77172866892b4148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-12 00:47:38 +00:00
Konstantin Shcheglov 888941c499 Completion. When fail, ensure that actual is printed without indentation.
So, it can be easily copy / pasted, without shifting manually afterwards.

Change-Id: I7da463226e2c276d41b1eb01226ade620c59d77b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-03-05 23:26:42 +00:00
Konstantin Shcheglov 7de13d86b1 Completion. Issue 54657. Suggest not yet imported extension types.
Bug: https://github.com/dart-lang/sdk/issues/54657
Change-Id: Iba61452accb796624ecec4b77c933cb97b33768d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-05 19:47:49 +00:00
Konstantin Shcheglov 323a15b6e4 Completion. Issue 54746. Don't suggest extension members in the body of class-like declarations.
Bug: https://github.com/dart-lang/sdk/issues/54746
Change-Id: Ia8e6a3a864caf75bebd13fe28e3419962b6f7a63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355510
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-03-05 17:10:36 +00:00
Brian Wilkerson d45080d365 Remove support for the older legacy completion protocol
This does not remove the computation of available declarations. This CL
seemed big enough without that, so I (or someone else) can get that in
the next CL.

Change-Id: I67ab49b75c8a415ccfaef16c4e49a00026a6091f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-12-12 00:54:48 +00:00
Brian Wilkerson 3ef27cc0fd Remove a missed piece of the test support for older legacy code completion support
Change-Id: I49a547ccfea531866a57da83691b21bcd7118b80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339203
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-11-30 18:40:38 +00:00
Brian Wilkerson 0915f6e053 Remove the tests related to the deprecated completion protocol
I left the mixin structure because Danny and I plan to use the same
structure to start adding LSP-specific test coverage.

Change-Id: I2eefc05c01eadb67f2c95fcaed3e5a963df7d69b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-11-30 05:27:39 +00:00
pq 440ea59ee0 enable flutter_style_todos in server
Change-Id: I4921d538e1498e66c8cab2d84dfcad21d1a7b555
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335952
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-14 21:08:12 +00:00
Brian Wilkerson 7dd241361d Change the computation of the completion node
Sorry about the size of the change.

This started as a CL to move the computation of keywords with a record
pattern from the contributor to the pass. In the process of doing so I
realized that the previous computation of the completion node (the node
that's visited) was too aggressive about moving upward in the AST. I
believe the issue happens when we reach a node in a list of similar
nodes (such as a statement in a block).

I changed the computation of the completion node, which necessitated a
lot of changes to existing code. It also resulted in changing several
tests, most for the better I think, but please look carefully for
places where you think the changes aren't reasonable. I'm also
interested in feedback about the change to the computation of the
completion node.

Change-Id: I2c6ac76fe88f672a206c3692d9ff51d2e487ec0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324620
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-09-07 00:53:55 +00:00
Brian Wilkerson 0b5e50a48f Convert the completion documentation tests
I think this removes the no longer used test support classes, but let me
know if you know of any code I missed.

Change-Id: I42105b75862631e9f86458ebb7f47a6f8d9935ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308809
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-13 00:32:57 +00:00
Konstantin Shcheglov 38546e90ab Pre-fix unreachable_from_main for instance members.
https://github.com/dart-lang/linter/pull/4441

Change-Id: I55afa6b7d78bc1114ce97c1b5bebcf7a8bca5b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307975
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-06-09 22:39:27 +00:00
Brian Wilkerson 5bf2e8c782 Convert closure completion tests
This also removes the tests converted in the previous CL because I
forgot to delete the file.

Change-Id: I306d64d227e2b5f632a9da9b547ce649e5d33767
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304142
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-17 18:48:58 +00:00
Brian Wilkerson d40890582c Convert uri completion tests
I am concerned about the tests marked with TODOs because I don't know
why the behavior changed. It's possible that the contributor is still
producing the suggestions but that they're being filtered out later.

I checked using the debugger, and they're not in the list of results
that we're getting back, so it seems likely that they represent real
bugs. If we just weren't detecting the bug before then we're good.

But I can't think how rewriting the tests could effect what the user
is seeing, so I think it's safe to make these changes.

Change-Id: If72042b7ec24b97994a12449c811213b8f708f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-12 18:08:15 +00:00
Brian Wilkerson 57b11688ae Convert static member completion tests
I'm becoming concerned that the filtering is making it difficult to
verify the results. We can look at the textual output to see whether all
of the printed suggestions are valid, but we can't know what other
suggestions are being produced and whether they're valid, nor can we be
sure that suggestions that shouldn't be produced are not being produced.

Change-Id: Id131b9b53740b625ba74a9b5bdb690da21fcdbfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302901
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-11 23:28:23 +00:00
Konstantin Shcheglov a240d5c463 Fix for extra diagnostics when now all files created at the start.
Change-Id: Icda792b55a1381294c4e3490694fb99ee2c4ca3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302446
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-10 18:04:49 +00:00
pq 68ef7530d7 switch expression conversions (and unnecessary breaks removed)
All auto-converted. A bunch more will be convertible when we address: https://github.com/dart-lang/sdk/issues/52005

EDIT: updated w/ 64 fewer breaks

Change-Id: I9b6009e316341e7c9b9c2f2c651b6eada385960d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-04-11 19:56:05 +00:00
Konstantin Shcheglov 04c1d58a4a Use mixins for analyzer packages, to prepate for language 3.0
Change-Id: I28fb5cf51c5dae887f19613d874d1ff264954be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290912
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 23:57:53 +00:00
Brian Wilkerson 262acf7c90 Allow completion tests to include suggestions of private identifiers
Change-Id: I4b735b75d0ab67598624bab3d340ef2e6ca25f37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286868
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-04 05:45:19 +00:00
Kallen Tu fe10dec12b [analysis_server] Avoid suggesting modified classes and mixins in contexts that don't make sense.
Change-Id: I0a5ebc1812998358d20a579d496ac3a26dec17fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-02-23 21:44:19 +00:00
Brian Wilkerson 3512e6e636 Produce suggestions for pattern variables
Change-Id: Icbef58507a63bde636dc70a981cd6e2083990a29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283743
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-17 18:51:11 +00:00
Konstantin Shcheglov b63c0c545a Add missing features to PubPackageAnalysisServerTest.experiments, remove duplicates.
Change-Id: Icc48a13123177406e5fbc7793c9d03228edad5c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281948
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-02-09 21:07:53 +00:00
Brian Wilkerson b83a4463fe Make the default print configuration in completion tests appropriate for more tests
Change-Id: I14c98611f84769a8a36e79d4725a5105f6d18f12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280066
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-30 18:50:28 +00:00
Brian Wilkerson 2ca588fce8 Support code completion in cast patterns
Change-Id: I429957a44bdc09a0936c10123b58b3514b23e016
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279563
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-24 00:22:32 +00:00
Brian Wilkerson 9c11d59a34 Clean up some code completion tests
Change-Id: I250fdee2e05684dffc2432b2b615f26e6860172e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279445
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-22 21:09:22 +00:00
Brian Wilkerson 0a0413aac8 Add completions for keywords in patterns
I'm reasonably confident that there are missing test cases, so please
let me know if you see any that you think should be added.

Change-Id: I7d6780158a6fb1aa2fe64e8efcb24982a39d7f18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278992
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-01-20 15:23:34 +00:00
Josh Soref 9e4dc755cb Spelling pkg
Closes https://github.com/dart-lang/sdk/pull/50921

GitOrigin-RevId: 6b1ca502b6722b0a987f33ace66f65cbd2c24e23
Change-Id: I74e4ff3c8e759c576036d6b791bd7734ebd215d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278536
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-01-19 10:06:29 +00:00
Sam Rawlins 166c54b4d9 analyzer: Mark implicit-casts and implicit-dynamic as deprecated
Also add a fix which replaces 'implicit-casts' with 'strict-casts' and
a fix which replaces 'implicit-dynamic' with 'strict-raw-types'.

Fixes #47902

This reverts 5050f31b29

Change-Id: Icd156b0dda78a50ed28272ddef7460018f511cc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276766
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-01-03 17:30:28 +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 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
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 0e39bb2d5e [analysis_server] Add additional checks for libraryUri to completion tests
Change-Id: I84e4234b543c1645024c65fc16e577932a6df429
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-07 16:28:41 +00:00
Danny Tuppeny 83f0bb25a4 [analysis_server] Allow multiple not-imported items in completion if name not already imported
Change-Id: Ie5bfa353d59546518180a08cd4720f793a01ba30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250660
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-07-06 17:19:40 +00:00