pq
a6714ffdff
a few new formatter migrations
...
See: https://github.com/dart-lang/sdk/issues/56685
Change-Id: Ifa7fbbc7aff7c5fd96b02cafe0da76b22a33b1e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386824
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-25 21:12:17 +00:00
FMorschel
dbf87d8644
Improving string conversion
...
Closes https://github.com/dart-lang/sdk/pull/56723
GitOrigin-RevId: 802fda7efeace66f33a82fa939a3efac11064390
Change-Id: I6d4d3931e62b89265eb1d324856bed5b9febfe8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-09-25 21:11:17 +00:00
FMorschel
a0374dd70c
Fix create method/function inside conditional operator
...
Closes https://github.com/dart-lang/sdk/pull/56722
GitOrigin-RevId: 9a861d4078b326754b8855e833c52ede03f0e28d
Change-Id: Ia7535ff48c16836b0e7d3a32005051c7defc3766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384941
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-09-25 20:51:54 +00:00
Danny Tuppeny
c8adf3da3f
[analysis_server] Update color handling for recent Flutter Color class changes
...
In https://github.com/flutter/engine/pull/54714 the "int value" that was used for storing the color values for a Flutter color was removed and replaced with `double red, double green` etc.
The color computer used the `value` field so this stopped it from computing any colors for previews in LSP clients. No tests broke because the tests here use a mock version of the Color class that still had `value`.
This change updates the mock Color class to match the new Flutter implementation, and updates the computer to use the red/green/blue doubles instead of parsing from an int.
It also adds support for the new `Color.from()` constructor that was also recently added.
Fixes https://github.com/Dart-Code/Dart-Code/issues/5289
Change-Id: I3ff20bda0cc848e028822cfcb5a14e6a8f6934d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386802
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-25 16:27:51 +00:00
Parker Lougheed
46cd8b627c
[linter] Move old lint details out of source
...
- Makes way for slowly replacing them with new "why" docs.
- Slightly reduces snapshot size of analysis server
- Colocates docs in the new linter/messages.yaml file.
Change-Id: I8708b8b55455a183ccfa5c9d8c21098ae0655b51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Parker Lougheed <parlough@gmail.com >
2024-09-24 23:06:34 +00:00
Brian Wilkerson
037f313959
Migrate add_missing_enum_case_clauses
...
Change-Id: Idef9c7cb952ed11d39082f160713daf9c75c67e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-09-24 19:25:22 +00:00
Fedor Shcheglov
9f4bb0d654
Issue 56559. Remove @override from private field, add to getter/setter.
...
Bug: https://github.com/dart-lang/sdk/issues/56559
Change-Id: I57e9c5e286af520499ddddeee5818f1c22a94ee8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-09-23 18:13:45 +00:00
pq
2c73635d00
[wildcards] fix ConvertToWildcardVariable to convert variable references
...
Change-Id: Ie9b9d03adf11bf2e18d5a3da6e28be8abf4eb53d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384943
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2024-09-23 16:53:11 +00:00
FMorschel
26a035d692
Fix remove-unnecesary-parentheses quick-fix false negative
...
Closes https://github.com/dart-lang/sdk/pull/56746
GitOrigin-RevId: 3e296b4b88b91d671e4e061ae8613f9b09d7f2f5
Change-Id: Ib174df2b3d825129c22eab71f2c7f38d88a66781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-09-23 15:04:44 +00:00
Lasse R.H. Nielsen
f24162c8bc
Let unintended_html_in_doc_comments ignore DartDoc links.
...
A link of `... [List<int>] ...` is now considered non-HTML,
and doesn't trigger the lint.
This is how DartDoc interprets the text.
Change-Id: I974e0ace31c3d7bf5f57b854c7b887a95684158d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384840
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Kallen Tu <kallentu@google.com >
Commit-Queue: Lasse Nielsen <lrn@google.com >
2024-09-18 14:22:11 +00:00
FMorschel
00a1608bd8
Add fix for use_colored_box
...
Closes https://github.com/dart-lang/sdk/pull/56702
GitOrigin-RevId: 1e043e03da0b43f7f7ab3365f16fe557689a712c
Change-Id: I7fff9c1d0f7c479890625b16b3beed449d504436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384662
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2024-09-17 18:37:54 +00:00
Parker Lougheed
4819bd09aa
[analyzer/linter] Deprecate LintRule.details to avoid new usages
...
Change-Id: I3d03d5f06901e0a548020522387e8984507a7f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-13 18:13:26 +00:00
pq
86306b194e
fix test expectation doc typo
...
Change-Id: I57aeac20269a2527e81822a550d483ab34064c6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/385081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Auto-Submit: Phil Quitslund <pquitslund@google.com >
2024-09-12 22:18:46 +00:00
Sam Rawlins
b1416116b7
analyzer: rename most API references to 'plugins' to 'legacy plugins'
...
Change-Id: I56217045ff9d4da8a5a556cd709e0f63a507884f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384964
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-12 21:25:56 +00:00
Konstantin Shcheglov
35bbfb2314
Parts. Move changes to prepare for removing deprecated 'enclosingElement'.
...
Change-Id: I79804b8907627e54d993a905c62ffc36e6d348b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384963
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-12 20:33:20 +00:00
Keerti Parthasarathy
fcd1e66663
[Code completion] Some more refactoring in SuggestionBuilder.
...
Change-Id: I86a1a1211385589ce1e288db5487cc8073b01746
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2024-09-12 16:48:59 +00:00
pq
9d1c3c9d42
[parts] enable experimentsForTests for all LSP server tests
...
Change-Id: I213292c4392a1c54f4ecfa059033d405d2d7b73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384826
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Phil Quitslund <pquitslund@google.com >
2024-09-12 16:18:20 +00:00
Erik Ernst
46cff10fc7
Add lint avoid_futureor_void
...
This CL adds support for a new lint, `avoid_futureor_void`, that reports on every occurrence of the type `FutureOr<void>` in a covariant or invariant position. More details can be found at https://github.com/dart-lang/linter/issues/4622 .
Change-Id: I1b86e04921d1fb0b3661be091ea1f4ad72089e8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382403
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-12 10:49:48 +00:00
Ben Konyi
9f5246e8c6
Revert "[ CLI ] Don't disable DDS when --disable-dart-dev is provided"
...
This reverts commit 81b9957bdd .
Reason for revert: Breaking multiple configurations.
Original change's description:
> [ CLI ] Don't disable DDS when --disable-dart-dev is provided
>
> Fixes https://github.com/dart-lang/sdk/issues/56605
> Fixes https://github.com/dart-lang/sdk/issues/54841
>
> TEST=N/A
>
> Change-Id: I6a13afe5f51fe67d2366c6d87ae74473651e24c8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383780
> Commit-Queue: Ben Konyi <bkonyi@google.com >
> Auto-Submit: Ben Konyi <bkonyi@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Reviewed-by: Phil Quitslund <pquitslund@google.com >
Change-Id: I5c6cb302d8160f19bad437341cdcd80bcc08d921
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384881
Reviewed-by: Siva Annamalai <asiva@google.com >
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Reviewed-by: Derek Xu <derekx@google.com >
Auto-Submit: Ben Konyi <bkonyi@google.com >
Commit-Queue: Siva Annamalai <asiva@google.com >
2024-09-12 01:15:27 +00:00
Ben Konyi
6f1887a1f2
[ DDS ] Fix tests broken by https://dart-review.googlesource.com/c/sdk/+/383780
...
TEST=N/A
Change-Id: I50e12596ebb7dc687e4c3d408104e450c3e91c3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384900
Commit-Queue: Ben Konyi <bkonyi@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-11 21:08:58 +00:00
Danny Tuppeny
0ed690798d
[analysis_server] Replace URI fields in tests with getters to avoid having to set all paths twice
...
This is a minor refactoring to swap some fields for URIs to getters so that any tests that modify them don't have to set both a path and URI (or risk them being out-of-sync).
Change-Id: Ic3776d250f4cfd9b0f16a7fc578ab5e7f19e52a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-09-11 20:14:23 +00:00
Danny Tuppeny
e7442b7066
[analysis_server] Add a semantic token modifier to wildcards
...
Also fixes top-level variable declarations to be treated as variables and not properties (see https://github.com/dart-lang/sdk/issues/55956 ).
Fixes https://github.com/dart-lang/sdk/issues/56567
Change-Id: I899ce4fc5950369acae70517d76a2830fe082731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384746
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-11 18:59:55 +00:00
Ben Konyi
81b9957bdd
[ CLI ] Don't disable DDS when --disable-dart-dev is provided
...
Fixes https://github.com/dart-lang/sdk/issues/56605
Fixes https://github.com/dart-lang/sdk/issues/54841
TEST=N/A
Change-Id: I6a13afe5f51fe67d2366c6d87ae74473651e24c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383780
Commit-Queue: Ben Konyi <bkonyi@google.com >
Auto-Submit: Ben Konyi <bkonyi@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-11 18:01:25 +00:00
pq
c386f13a83
[enhanced-parts] Code Folding tests
...
Fixes: https://github.com/dart-lang/sdk/issues/56696
Bug: https://github.com/dart-lang/sdk/issues/56696
Change-Id: I20011f1c60bab29d8ed6e78be70b6f807dce03f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
2024-09-11 17:33:51 +00:00
Sam Rawlins
5ee4eb52e6
DAS plugins: Add plugin package generator
...
This generator will be used create shared plugin package entrypoints from
plugin configurations.
Work towards https://github.com/dart-lang/sdk/issues/53402
Change-Id: If5c6aeb7bc7845311975928fba1cb9c8d273423c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-09-11 16:54:29 +00:00
Paul Berry
cda2815bb1
Add UNREACHABLE_SWITCH_DEFAULT warning to the analyzer.
...
This warning is similar to the existing `UNREACHABLE_SWITCH_CASE`
warning, except that it warns if the `default` clause of a switch
statement is unreachable due to all the `case` clasuses fully
exhausting the switched type.
To make the implementation easier, I changed the API for the
`reportExhaustiveness` method in `_fe_analyzer_shared` (which is the
primary entry point to the shared exhaustiveness checker). Previously,
this method returned a list of `ExhaustivenessError`, where each list
element was either an `UnreachableCaseError` (indicating that a
certain case was unreachable) or a `NonExhaustiveError` (indicating
that the entire switch statement was not exhaustive). If the caller
passed in `false` for `computeUnreachable`, `UnreachableCaseError`s
would not be returned, so the returned list would either be empty or
contain a single `NonExhaustiveError`.
The new API renames the types for clarity:
- `NonExhaustiveError` becomes `NonExhaustiveness`, to highlight the
fact that it's not necessarily an error for the switch's cases to be
non-exhaustive; it's only an error if the scrutinee's static type is
an "always exhaustive" type and there is no `default` clause.
- `UnreachableCaseError` becomes `CaseUnreachability`, to highlight
the fact that it's not an error for a case to be unreachable; it's a
warning.
Also, the new API adds instances of `CaseUnreachability` to an
optional user-provided list instead of returning a newly created list;
this allows callers to communicate that they don't need to see
`CaseUnreachability` information by passing `null`. This frees up the
return type to simply be an instance of `NonExhaustiveness` (if the
cases are not exhaustive) or `null` (if they are exhaustive). This
makes it easier for the analyzer to decide whether to issue the new
warning, because it doesn't have to dig around the list looking for an
instance of `NonExhaustiveness`.
The new warning has an associated quick fix (remove the unreachable
`default` clause). This quick fix uses the same `RemoveDeadCode` logic
in the analysis server that the existing `UNREACHABLE_SWITCH_CASE`
warning uses.
Fixes https://github.com/dart-lang/sdk/issues/54575 .
Bug: https://github.com/dart-lang/sdk/issues/54575
Change-Id: I18b6b7c5249d77d28ead7488b4aae4ea65c4b664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378960
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
2024-09-10 19:13:12 +00:00
pq
1bdb366d4d
[enhanced-parts] test “Organize Imports”
...
Fixes: https://github.com/dart-lang/sdk/issues/56683
Change-Id: I6b6aae385d4313e551f7c110e1e2544cc418a5a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384308
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Auto-Submit: Phil Quitslund <pquitslund@google.com >
2024-09-10 17:23:40 +00:00
pq
ecbf9ee568
[enhanced-parts] test "Sort Members" in a part w/ imports
...
Fixes: https://github.com/dart-lang/sdk/issues/56684
Change-Id: I259090327e82926d1c01dae1ce11b328e3f2e7cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384309
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Auto-Submit: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-10 16:57:11 +00:00
Danny Tuppeny
df010e598f
Support DTD requests in the message scheduler
...
Most DTD tests are currently skipped because we're not currently exposing the LSP handlers, however I temporarily added them and verified with this change that those tests pass (both success and error requests).
Change-Id: I001b7b07c99be18a3711a434bdd081a631e4b4c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-09-10 16:42:47 +00:00
Danny Tuppeny
ffeadc947a
[analysis_server] Fix sorting of different kinds of imports in DartFileEditBuilder.importLibrary
...
Previously any pending imports added by DartFileEditBuilder would just be sorted by their text ignoring the kind of import. If there were existing imports for dart, package, relative then they might be inserted in the right places, but if there were not (or not the right kind) of existing imports, they would be just be added in alphabetical order (rather than dart, then package, then relative).
This change extracts some of the rules for sorting directives from analysis_server's ImportOrganizer into analyzer_plugin/src so that they can be reused by the DartFileEditBuilder that lives there.
Fixes https://github.com/dart-lang/sdk/issues/56657
Change-Id: I6dc5476add2b7b1804080ffdc8270d0bb80597db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384284
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-10 14:43:58 +00:00
Keerti Parthasarathy
857243efe0
[Code completion] Move logic from SuggestionBuilder to NamedArgumentSuggestion.
...
Change-Id: I1e6d1a75ecb37c8dd7ee65414d880431347053a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2024-09-10 03:03:48 +00:00
Fedor Shcheglov
4a7f9c87e2
Issue 56682. Add break for empty cases when converting if chain into switch.
...
Bug: https://github.com/dart-lang/sdk/issues/56682
Change-Id: Iafc1154801ec207152104b9b064f2b587a13ac4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384306
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-09 22:49:51 +00:00
Konstantin Shcheglov
4dba633c0c
Parts. Deprecate LibraryElement.accessibleExtensions
...
Change-Id: I59227d602d69949e49ed523285b5f77493f70299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-09 22:18:52 +00:00
Fedor Shcheglov
bbc642e6c1
Issue 56371. Quick assist from switch to if statements chain without unnecessary break statements.
...
Bug: https://github.com/dart-lang/sdk/issues/56371
Change-Id: I826f6f8fa1e9b5123ff8aa1d637d5da1ff63a09a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383931
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-09-09 15:58:39 +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
Konstantin Shcheglov
8dd8fd7bc3
Parts. Remove diagnostics related to augmentation imports.
...
Change-Id: I70a8765d6e9514064a450c3b25b7b66869c12bc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384044
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-06 21:32:12 +00:00
Konstantin Shcheglov
0de8f19be3
Parts. Remove isAugmentation, rename isMacroAugmentation to isMacroPart.
...
Change-Id: Ibf60f8d20f304a15ff9b2049788a3775fc09686d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383922
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-06 21:16:29 +00:00
Fedor Shcheglov
4aaca0b4c0
Issue 56413. Consider prefer_int_literals in 'Wrap with Padding'.
...
Bug: https://github.com/dart-lang/sdk/issues/56413
Change-Id: I0e4aa2a53a2387caa4ad451e7033767c1b180436
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2024-09-06 20:24:48 +00:00
Danny Tuppeny
40b9153fab
[analysis_server] Fix semantic tokens/highlights skipping annotations on super parameters
...
+ treat super parameters that reference field formals as field references, the same as field formals themselves.
Fixes https://github.com/Dart-Code/Dart-Code/issues/5247
Change-Id: I5ea841a32445a141a3cf46d8662154f2e9950ebe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383580
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-06 14:34:59 +00:00
Konstantin Shcheglov
d90bb7321a
Parts. Remove support for library augmentations.
...
Change-Id: I04f076ea6917bd4597b79c75db16207ccf387c9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-05 22:21:33 +00:00
Konstantin Shcheglov
4855fed15b
Parts. Report UNNECESSARY_IMPORT using the new tracking.
...
Change-Id: Ide8f003bdfb1c80f1e342d3742b538edfda6ad8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-05 22:16:21 +00:00
Honza Bittner
18466983ac
feat: make remove widget work for slivers
...
Closes https://github.com/dart-lang/sdk/pull/56638
GitOrigin-RevId: 835dd143a7b56a9249d4d48da5de4253c57bee21
Change-Id: If0fd507b51a224770cf724568925fa895bfa3e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-09-05 22:13:30 +00:00
Keerti Parthasarathy
caa36cfe83
Add a MessageScheduler queue that all incoming messages to the analysis server go through.
...
Change-Id: I3770b5a1a8faa391fb35a5a1e3d2678dbc4fb3f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383703
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-05 20:45:59 +00:00
Keerti Parthasarathy
e7d367b1bc
Delete dupicate code in DeclarationHelper.
...
Change-Id: Id3db7c34a7770b784d581ec0f65a4600e54f9963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-05 16:05:04 +00:00
Keerti Parthasarathy
1236a6a128
Delete unused methods in SuggestionBuilder.
...
Change-Id: I9849e6c5534c73233381f93e2bca0cfed2535669
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2024-09-05 01:44:40 +00:00
Danny Tuppeny
803537682f
[analysis_server] Provide LSP ClientCapabilities to LSP handlers reflecting the calling client instead of always the server
...
Prior to this change, all LSP handlers would ask the server for the client capabilities when they would affect their output. For callers over DTD, this could result in the same requests getting different results depending on the capabilities of the editor.
This change adds LspClientCapabilities to the MessageInfo that goes along with each message (usually a request) and then passes in the servers clientCapabilities for requests originating from the editor client, and a fixed set of capabilities for requests that come from DTD.
Most handlers will now use the callers capabilities, however there are a few handlers that build edits to send to the editor (instead of _returning_ the edits), which will use the editors capabilities.
This is essentially a no-op for now, because we're just providing the same capabilities via a different route - but when we come to supporting LSP handlers over DTD (that are affected by client capabilities), they will get consisted results based on our fixed set of capabilities (which as of yet is probably incomplete and may be updated a little as that progresses).
Change-Id: I5bcef8c3ebb7b94c83d85e56a303333d302abdee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2024-09-04 17:04:46 +00:00
Moritz
4eca2005c9
Switch to new locations of mime and source_map_stack_trace
...
Change-Id: I241ddb82a36daaf299291fd59598e5c8f1893984
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382385
Reviewed-by: Alexander Aprelev <aam@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Moritz Sümmermann <mosum@google.com >
2024-09-04 06:56:37 +00:00
Konstantin Shcheglov
67c21f7b67
Migrate from 'import augment' to 'part' in analysis_server/.
...
Change-Id: Iac57024ab48ed389b4578bc0fb2a2e620533812b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-09-03 19:45:55 +00:00
Konstantin Shcheglov
957699fba9
Revert "Parts. Track used imports while resolving library files. #v2"
...
This reverts commit b3cdad286f .
Reason for revert: https://github.com/flutter/flutter/issues/154413 - there is a test in Flutter that expects UNUSED_IMPORT that we don't report anymore.
Original change's description:
> Parts. Track used imports while resolving library files. #v2
>
> TGP looks green.
> https://fusion2.corp.google.com/presubmit/668751751/OCL:668751751:BASE:669923082:1725204615406:830df8a3/targets
>
> Previous: https://dart-review.googlesource.com/c/sdk/+/382680
> Revert: https://dart-review.googlesource.com/c/sdk/+/382903
> Change-Id: Idbca23a13cf5c7490aa8bc859e21609c6241951e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383022
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Change-Id: I2825dae66db0b7eaef1b86511ce1eb9b958d8b20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383380
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-09-03 16:40:20 +00:00
Konstantin Shcheglov
2aa54ab42c
Parts. Fix unnecessary_import before landing the reporting CL.
...
https://dart-review.googlesource.com/c/sdk/+/382901 will start
reporting it in more cases.
Change-Id: I3ae1d407f37a317f33cb98977b0e6eb08de75065
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383221
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2024-09-03 03:51:29 +00:00