Commit graph

835 commits

Author SHA1 Message Date
Brian Wilkerson d9482e35ce Remove some unnecessary ignore comments in analyzer packages
Change-Id: I578285132f0d3f200cb2e9069750a1391940711d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 21:33:18 +00:00
Danny Tuppeny 092bdb17d3 [analysis_server] Improve Snippet performance with caching and earlier filtering
This shares a cache for mapping Elements to their public LibraryElements across each snippet producer, and also skips snippet producers that produce snippets that won't match any typed prefix.

Change-Id: I6b64b3c55f1030a5eaa7ca1afdcd6c416e4baa08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273962
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-12-07 20:31:12 +00:00
Danny Tuppeny c24f36d470 [analysis_server] Use public (non-src) URIs for Flutter snippet imports
Fixes https://github.com/dart-lang/sdk/issues/49081.

Change-Id: I0734b4f45c72d70f7b32640bed6b6ec2e8130c01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-05 22:32:19 +00:00
Danny Tuppeny a7baf9309f [analysis_server] Ensure plugin protocol classes only use types valid for Isolate.send()
Fixes https://github.com/dart-lang/sdk/issues/50594.

Change-Id: I5550239dbce4a1ed7fbd844dd53642989289c899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-01 16:57:56 +00:00
Konstantin Shcheglov 0b7124729d Use late final 'folderWithExamplesApi' for examples/api.
Change-Id: I5d02f0656e914a87dff33532c3835a373472104a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272352
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-29 02:56:33 +00:00
Sam Rawlins 4d5426b35a analysis_server: Refactor disk reads for examples directory
Fixes https://github.com/dart-lang/sdk/issues/50542

One primary principle is keeping the cost for _most code_
extremely low. Most code does not have an `examples/api`
directory. Most comments do not have `{@tool`.

Looking for directories on disk is expensive. Walking tokens
in comment text is cheap. So we can pay the price of walking all comments, prowling for `{@tool` text which we won't likely find,
and skip the work of looking for `examples/api` in _all_ parent
directories, until we find a comment with `{@tool`.

Don't check if `$parent/examples` exists before checking if `$parent/examples/api` exists. We don't care if `$parent/examples`
exists.

Don't create an `AanlyzerConverter` instance for _every element_
in a compilation unit while we are editing it. Instead, refactor
some of the `AnalyzerConverter` methods to be extension methods.

Change-Id: I812a1a435ee075e921782c1a57e9ed77325f9387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271863
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-28 19:53:01 +00:00
Sam Rawlins 5f8ef7be53 Enable new linter rules in analyzer packages
Change-Id: Id0182648a347a05cbf6e1483a0afe94219268853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-21 23:02:38 +00:00
Danny Tuppeny 3f206da5e3 [analyzer] Propagate nullability in InterfaceType.allSupertypes
Fixes https://github.com/Dart-Code/Dart-Code/issues/4185.

Change-Id: Ic9fcd60ef3eae24e3921c25162ec405a56c62c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-11-17 21:59:44 +00:00
Danny Tuppeny 1d64cba68e [analysis_server] Fix override completions being suppressed because of import edits
Fixes https://github.com/Dart-Code/Dart-Code/issues/4116, although currently inserts the override without adding imports (imports will be added in a separate CL).

Change-Id: Ib78442c8a084928ff7da122a17d4b035b3fade8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-11-16 17:51:50 +00:00
Ahmed Ashour 98afb38b6a [analysis_server] add fixes for MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN_*
Fixes #50312

Change-Id: I0c599dede1c2c0710d35997144db5457360b096b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-28 14:42:57 +00:00
Brian Wilkerson 87185a7e83 Extend change builder to support imports with a prefix
Change-Id: I7735ca52e7d34e876608460141e94693f3910f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265582
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-25 20:59:45 +00:00
Konstantin Shcheglov 664c021374 Deprecate xyz2 in elements.
Change-Id: I0dbf25882cf66670ce2d69dd22aceb053be9feb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/265182
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 22:07:47 +00:00
Konstantin Shcheglov 671bb192ab Remove domain 'kythe' from DAS.
Change-Id: I66f0e538dce6eead6ba1c98b9cf0e3d747450130
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264895
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-21 17:03:29 +00:00
Konstantin Shcheglov 683e2419da Deprecate 'DartType.element2' use 'element' instead.
Change-Id: I6986a058616db489987789cfab09d53a450e3ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262666
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-05 16:30:09 +00:00
Konstantin Shcheglov fcc9473dab Deprecate CatchClause.exceptionParameter2/stackTraceParameter2
Change-Id: I3f0ae9367f35fe514a125cb0f06ccbdc8fa0dc18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262502
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-10-04 15:58:11 +00:00
Konstantin Shcheglov 8a5725ad38 Deprecate 'Directive.element2', use 'element' instead.
Change-Id: I2326b43381d1d3f84d74f69409bc688516f6a0d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262500
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-10-03 21:10:58 +00:00
Greg Spencer 73bb76184f Fix Windows tests, return absolute paths from example navigation
Fixes failing post-submit Windows tests,
and causes the examples/api IDE navigation results to return absolute paths.

Change-Id: If6d1ca9848644b78ff6f8e9549b84df7139b7ffc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261801
Auto-Submit: Greg Spencer <gspencer@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-29 16:58:51 +00:00
Danny Tuppeny 604bf2fe3b [analysis_server] Don't overlap folding regions when lineFoldingOnly
+ convert LSP folding tests to use TestCode parser.

A change in VS Code means two folding regions are no longer allowed to end/start on the same line (the second range is silently dropped). This truncates folding regions if they end on the same line that another starts to end on the line before (but only if a client only supports line-folding mode).

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

Change-Id: Ic26f58f84c44a01ae5157c336ed0f207d1c0eeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-29 16:34:07 +00:00
Danny Tuppeny dd12cfd073 [analysis_server] Filter "see code in" navigation regions to requested range
This fixes one of the issues noted in https://github.com/Dart-Code/Dart-Code/issues/4181, where all example regions would be returned for a code block instead of only those that matched the requested region.

This was because the code that handles comments didn't go through helpers in `_DartNavigationCollector` that does the filtering.

Change-Id: I58931c02f0e4f538c246dc8fc0c3e57895cad5fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261365
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 19:33:36 +00:00
Danny Tuppeny d97c3e8702 [analysis_server] Fix updating of selections in change builder when additional edits are made
This fixes a few minor issues:

- Setting a new selection position did not remove a previously set selection range (which could result in a mismatched offset/length due to how the resulting change merges the position/range)
- Setting a new selection range did not update a previously set selection position
- Inserting new changes before a change that sets a selection range only updated the selection position, not selection range
- Setting a selection range/position after another change that inserts only updated the selection position to compensate and not the selection range

These issues led to cases where selection ranges could be incorrect, or even overlap with linked edit groups that could cause errors that caused code action requests to fail.

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

Change-Id: I43e2a8361c97b2eccb2d6b426a75eda5cc811e06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261682
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 17:32:24 +00:00
Greg Spencer ae7e3517c8 Add a test for examples/api navigation, and fix it
This adds a test for the dartdoc "See code in examples/api..." navigation in the analysis_plugin, and changes things so that it doesn't walk the directory tree to find the examples directory more than once per compilation unit.

Change-Id: I1938396b160ca2d21b08214f79fb1c7ddbf6a388
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Greg Spencer <gspencer@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 16:31:26 +00:00
Konstantin Shcheglov 745d0ff64a Deprecate 'Element.enclosingElement3', use 'enclosingElement'.
Change-Id: I6f4fd7e8c0f071bde10cb5e57ed6195ae517e575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-26 23:58:14 +00:00
Simon Binder eb1f864540 analyzer_plugin: Support latest analyzer in pubspec
Related to https://github.com/dart-lang/sdk/issues/50043

Change-Id: I6e0a93f647e4017bfb320abf29992745908f466e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260704
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-23 21:57:49 +00:00
Konstantin Shcheglov 44316060f1 Deprecate 'get declaredElement2', use 'get declaredElement' instead.
Change-Id: Ida7a9c2ac35943aed2d75f81f98ce7056b616aee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260741
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-23 20:05:29 +00:00
Ahmed Ashour 4f42058b4f [analyzer] use preferred quote-style for edit.importElements
Bug: #49559
Change-Id: Ic9c272c78f15599c5f3c985466f815cec82ad62b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-23 19:59:59 +00:00
Sam Rawlins 51114fca8a Unnamed libraries
Fixes https://github.com/dart-lang/language/issues/1073

Spec: https://github.com/dart-lang/language/blob/master/accepted/future-releases/unnamed-libraries/feature-specification.md

This work allows library directives without a name. Every single one would look like this:

```
library;
```

:) it was a little anti-climactic implementing a non-feature like this, but there it is.

The affordance for a library directive without a name is guarded by an experiment flag, `--unnamed-libraries`.

Change-Id: I8612238359e88d6082f7e89d0d0fc624fdb45273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257490
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2022-09-23 05:37:39 +00:00
Konstantin Shcheglov e03170035a Deprecate 'get name2', use 'get name' instead.
Change-Id: Iee8ef5fb6700d96c857a22a99dc61dac3da88572
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-22 02:22:47 +00:00
Ahmed Ashour e09493b7bc [analyzer] use preferred quote-style when generating imports
Bug #49559

Change-Id: Ib77ea67bb1ea15bfabb1c717cfb5abf13fd6d3cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-21 17:12:46 +00:00
Ahmed Ashour 5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00
Danny Tuppeny 1857d5d7ec [analysis_server] Enable new refactors in LSP behind a flag + additional tests
Change-Id: Iec717f9522efaa51e8b087a022c0bca1bbd2da14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-15 16:43:29 +00:00
Brian Wilkerson d6ff1193c5 Partial implementation of record types in DartEditBuilder
While the work is incomplete (see the TODOs), this fixes an exception
that I saw this morning and is, I believe, a step in the right direction.

Change-Id: I6adc0e0df4ea9b64ea0c5d1dcd42a078d30c4a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258507
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-09 21:48:25 +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 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 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
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 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
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
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 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
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
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
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
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
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
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
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