Commit Graph

698 Commits

Author SHA1 Message Date
Konstantin Shcheglov 64baa393e5 Elements. Deprecate JoinPatternVariableElement.variables2, use 'variables' instead.
Change-Id: Ie896718aa19a5867be1a05a210ffb28a0daaa79e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429824
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-21 13:59:30 -07:00
Konstantin Shcheglov 5d175fa43c Elements. Deprecate InterfaceElement.constructors2, use constructors.
Change-Id: I78faea1fdbc55e46cdb7fc0b187d12561736cec2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429822
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-20 15:11:42 -07:00
Konstantin Shcheglov adb4a8a559 Elements. Deprecate InstanceFragment.xyz2, use 'xyz' instead.
Change-Id: I18331cc6a2cd0c9f01de79d8d5ea0178cd39dc16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-05-16 10:29:02 -07:00
Konstantin Shcheglov 78bc6da66c Elements. Deprecate InstanceElement.xyz2, use 'xyz' instead.
Change-Id: Ie12b7596b70c77fd2f08520a423eeaf3b6978326
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-05-16 10:24:25 -07:00
Konstantin Shcheglov 05da3e1f22 Elements. Deprecate Element.enclosingElement2, use enclosingElement.
Change-Id: I055b1f9dd1c00605d813effcbbadb9cea874129a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-05-15 13:47:32 -07:00
Konstantin Shcheglov c6722fc566 Elements. Rename / deprecate ClassElement.isXyzIn
Change-Id: I5ebc171cd8de04526cdde35f4140635f6bea7edd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/428845
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-05-15 12:36:00 -07:00
Sam Rawlins 8a17ad9f05 analyzer: Deprecate AnalysisError in favor of Diagnostic
Work towards https://github.com/dart-lang/sdk/issues/60635

Change-Id: If9bbc96beed95129b099588c5bd9728afda8e392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426902
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-05-08 14:02:16 -07:00
Sam Rawlins fafad4e03d analyzer: Move the API tool so that it can generate API for other packages
Also, add some scripts to generate the analyzer_testing API, and checkin
the api.txt file for analyzer_testing.

In order to avoid a private analyzer import, I add `isExperimental` and
`hasExperimental` support for `@experimental` annotation, and switch
to using public APIs in `_dumpElement`.

Change-Id: I44319270d4e6083b80973b45933268c472876232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426282
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-05-02 14:22:31 -07:00
Konstantin Shcheglov c644933a82 Elements. Make ElementDirective abstract, not sealed.
This allows to have `ElementDirectiveImpl` internally.

Presubmit in google3 is green: cl/752778004

Change-Id: Ia56ad45fab8d95aa5a089aae338414a7f5c4d549
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-05-01 12:21:50 -07:00
Konstantin Shcheglov b2fdd8a345 Elements. Rename XyzElement2 into XyzElement.
The CL was done with rename + adding typedef for each class.

Change-Id: Ia25cc581d2e42cf7d12a85a3579af952d5c232ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-25 13:27:18 -07:00
Konstantin Shcheglov 49599e06cc Elements. Deprecated element2.dart library.
Change-Id: I2be38df49e6f242d9fe59f34164549da4a0f41b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424683
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-25 11:23:18 -07:00
Konstantin Shcheglov a564aef5eb Elements. Remove ElementLocation.
Change-Id: I92b46c19878e4b0e27d2bf5e08b90bbb666df1e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-04-25 09:50:07 -07:00
Konstantin Shcheglov 05d1658495 Elements. Move everything from element2.dart into element.dart, re-export.
I do not deprecate element2.dart in this CL, to make the change smaller, but I will in a following CL.

Change-Id: I78b73eea5b47cf62122daae74c0bfe6e5bb8b0ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424581
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-25 08:37:33 -07:00
Sam Rawlins 41461344d5 analyzer/linter: Support an @awaitNotRequired annotation
Work towards https://github.com/dart-lang/sdk/issues/46218

This implements the bulk of the `@awaitNotRequired` support as specified here: https://github.com/dart-lang/sdk/issues/46218#issuecomment-2725895048

Remaining work:

* implement inheritence
* report a badly-placed annotation
* add the annotation to the real meta package

Change-Id: Ida16018746704d0baa165ab9be95187b52a79061
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423923
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-23 10:53:39 -07:00
Konstantin Shcheglov 564e9384c0 Remove deprecated RecordType.positionalTypes/sortedNamedTypes
Change-Id: I9fd4768abe3956a7e82291de3f8a2f0b9f606959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423602
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-22 08:50:30 -07:00
Konstantin Shcheglov cdab11ca77 Remove deprecated DartType.isStructurallyEqualTo
Change-Id: Ibf7ec9f5af9011a162c1db5080702fddbdd4f27c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-04-22 07:26:09 -07:00
Konstantin Shcheglov becd91df17 Format analyzer/ with tall mode.
Change-Id: I410cd1cf63fbf00b868bbb3e060433cad3ac9e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2025-04-21 12:15:58 -07:00
Konstantin Shcheglov a4171e715b Elements. Remove V1 Element.
Change-Id: Icf4941f3ff2765ea0d5fd7728604c77607327595
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423447
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-21 08:52:03 -07:00
Konstantin Shcheglov 96fe407ce7 Elements. Remove V1 Element.thisOrAncestorMatchingX() methods.
Change-Id: I0a788b2fa3d849d55a4690b59aab1fa6ef4ff04e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423446
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:46:36 -07:00
Konstantin Shcheglov 67b9a1be74 Elements. Remove V1 Element used in scopes.
Change-Id: Ic4f838e9033942137b1d4a855d9d378bb2a1931f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423073
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-21 08:38:34 -07:00
Konstantin Shcheglov de2b3fa1cd Elements. Remove V1 ElementAnnotation.element
Change-Id: Iea9716d71cbb4cf8bb0504ae9847fd613b0d9811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423444
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-21 08:35:58 -07:00
Konstantin Shcheglov ba86b99628 Elements. Remove V1 UriReferencedElement.
Change-Id: I3590bde0ffb50ae3e85c71d436201294c5390dfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423072
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:30:32 -07:00
Konstantin Shcheglov 34a97d2c9f Elements. Remove V1 LibraryElement.
Change-Id: I01c41cc34511565cf994c27314f6e41024db8f9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:27:54 -07:00
Konstantin Shcheglov 0de0695c2c Elements. Remove V1 PartElement.
Change-Id: Id78a06bcebb84c343e79111d1bad0ebe92680bca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:14:26 -07:00
Konstantin Shcheglov 07d53499d9 Elements. Remove V1 LibraryImportElement.
Change-Id: I4e4c4affd3edef452ece80133f32a2d7dacc1511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:11:48 -07:00
Konstantin Shcheglov 79aa9ca3e3 Elements. Remove V1 LibraryExportElement.
Change-Id: I7c334034cf3c19101b4f8b7bec7d6da243112941
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423070
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:06:22 -07:00
Konstantin Shcheglov a477b7eb42 Elements. Remove V1 VariableElement.
Change-Id: Ib326d8d1e22954bfb8b567917357e4687e488c13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423069
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 08:03:45 -07:00
Konstantin Shcheglov 3c5193f9f1 Elements. Remove V1 LocalElement, PromotableElement.
Change-Id: Ifd11fcfd740c848e570ef076b20b9e43bbeb0cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423066
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-21 07:58:19 -07:00
Konstantin Shcheglov 2f478a771f Elements. Remove V1 ParameterElement.
Change-Id: I5ebfcf9a15548dc3bf0541f058c6c46a9e8bdc0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423065
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-21 07:55:42 -07:00
Konstantin Shcheglov 8c655368fe Elements. Remove V1 LocalVariableElement.
Change-Id: I3a3fc0d3c28e7b20e7d0b8e41f71b05e628ae0d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423064
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-21 07:49:48 -07:00
Konstantin Shcheglov 24b2a16960 Elements. Remove V1 PrefixElement.
Change-Id: Ic4987ada9be6b44b2602a90998f29bee43c7f352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-21 07:47:39 -07:00
Konstantin Shcheglov ff74ea249a Elements. Remove V1 ClassMemberElement.
Change-Id: Ic3c57c866db30d2fdc922e64761f074a01b44278
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423217
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 15:26:41 -07:00
Konstantin Shcheglov 25a479bcba Elements. Remove V1 CompilationUnitElement.
Change-Id: I9efdbd57bfabab0f7830a3e765e81da5cd4afc15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 15:24:54 -07:00
Konstantin Shcheglov 5404357d93 Elements. Remove V1 PatternVariableElement.
Change-Id: I6dfbc8cff1d292b1339a559a72e9907ed8fbfdbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423215
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 15:18:29 -07:00
Konstantin Shcheglov 73daa66a06 Elements. Remove V1 TypeDefiningElement.
Change-Id: I71ce0e198a07486f9c8b778fe642df5d7aaf73ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423214
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 15:16:51 -07:00
Konstantin Shcheglov ea17045cd6 Elements. Remove V1 TypeParameterElement.
Change-Id: Ia04eac5e5a92de635630bd002b73c29919411863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423213
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 15:10:17 -07:00
Konstantin Shcheglov 91294c1a84 Elements. Remove V1 TypeParameterizedElement.
Change-Id: I51563fc12b6d2f03c2bf890bbbabd3de7bad4b0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423422
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 15:02:15 -07:00
Konstantin Shcheglov 3169300bd7 Elements. Remove V1 FunctionTypedElement.
Change-Id: I0a85aeb090d7184556e588ea23c7669b0063be91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423212
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 14:55:58 -07:00
Konstantin Shcheglov 24021793d3 Elements. Remove V1 ExecutableElement.
Change-Id: Ib73c335b05649547a5ae797d033cedbeb22212ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423210
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 14:54:09 -07:00
Konstantin Shcheglov 7ec3326c77 Elements. Remove V1 LabelElement.
Change-Id: I0f6828177b227d867360fe51bc57aeb5a9d4ff42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423420
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 14:17:11 -07:00
Konstantin Shcheglov 30e49d6d35 Elements. Remove V1 PropertyInducingElement.
Change-Id: Idd9a797bae88a25b4934a24c16c7095d3e181396
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423209
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 14:14:02 -07:00
Konstantin Shcheglov 1d23faf51a Elements. Remove V1 FieldElement.
Change-Id: Ie5b1f35b1922f716c0d1a313f8105dd9a1f90bc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 14:06:19 -07:00
Konstantin Shcheglov 046199ba9b Elements. Remove V1 FieldFormalParameterElement and SuperFormalParameterElement.
Change-Id: Ie19b02e78804f2a67f8770ae86f085799ce730e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423203
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 13:58:16 -07:00
Konstantin Shcheglov adad55f894 Elements. Remove V1 PropertyAccessorElement.
Change-Id: Ife5ded38f5c4bb3951653013d7d283c663a4f300
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423208
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 13:28:50 -07:00
Konstantin Shcheglov c6e3f9ab7c Elements. Remove V1 MethodElement.
Change-Id: Iefc0f398e98e16328a45b183373e440e25321afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 13:26:08 -07:00
Konstantin Shcheglov 23246dece7 Elements. Remove V1 getters from FunctionType.
Change-Id: Ic1d3b2d64c4b6b647c9134263d77479bf88b16c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423365
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 13:20:47 -07:00
Konstantin Shcheglov 7cb48f85e7 Elements. Remove V1 getters from InterfaceType.
Change-Id: I3a8827b8bee876b326a58ade17c580ea7783c1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-04-18 13:12:43 -07:00
Konstantin Shcheglov 6a324ac261 Elements. Remove V1 GenericFunctionTypeElement.
Change-Id: I2d144ed740f38c13355dcead83978ea5da6b073a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423401
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 13:05:39 -07:00
Konstantin Shcheglov aadf532dbf Elements. Remove V1 InstanceElement.
Change-Id: I8233c89aa693101dc65fd8c0b75666ab35a04545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423205
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 13:04:39 -07:00
Konstantin Shcheglov 7e40b7cdf9 Elements. Remove V1 FunctionElement.
Change-Id: Ic0e5828b00bfd234106b582412ed2cbe2cff4ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423400
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-18 12:19:31 -07:00