Brian Wilkerson
f92ea3d58d
Update the relevance table generator to support newer language features
...
I don't have a lot of confidence that the data being collected is what
needs to be collected in each of these cases, but I believe that I've
correctly identified the visit methods that need to be collecting data.
I think we need to have a test that ensures that the keys being used in
this table generator are the same as the keys being used by the
relevance feature computer (as computed by the in-scope pass). I don't
know exactly what that test would look like, but that would ensure that
(a) the keys are the same and (b) the table generator isn't missing
keys being used by the completion engine or collecting data that isn't
being used.
I also fixed a bug that prevented this generator from running and tested
to ensure that it could run over several example packages.
Change-Id: I0c0cff148d288942e39ee876e89cdf9d1468f59d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/473780
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2026-01-16 10:04:00 -08:00
Paul Berry
8600df906e
[messages] Add SyntacticEntity.sourceRange getter.
...
This will allow diagnostic reporting code in the analyzer to be more
easily converted to the new literate diagnostic reporting API, because
it will make it possible to use `SourceRange` as the common
denominator for situations where the location where a diagnostic needs
to be reported might come from either a `SyntacticEntity` or a
`SourceRange`.
Change-Id: I6a6a6964f3ec2ea33e8900d93b5abe714c9e1dcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Paul Berry <paulberry@google.com >
2025-12-15 09:02:26 -08:00
Konstantin Shcheglov
e61aa1107d
DeCo. Add ConstructorDeclaration.typeName, switch analysis_server/ to it.
...
Not actual migration, uses null asserts.
Should be made safe as part of implementation in the server.
Bug: https://github.com/dart-lang/sdk/issues/61701
Change-Id: I792ca9d05f25d3819d83a6119586ef937f00d31f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/463464
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-11-20 13:52:56 -08:00
Konstantin Shcheglov
0349520b98
DeCo. Migrate everything to new AST.
...
No more flag, always parse into the new AST, always visit new AST nodes,
always return them as child entities, parent-child structure reflects
the new AST.
So, use `namePart` and `body` where possible. Deprecate previous
properties.
This is still de jure a breaking change, because `parent` of deprecated
properties changes. De facto this required very few changes in google3.
Once this CL lands, I will publish `analyzer 10.0.0`, migrate everything
to new properties, delete deprecated properties, and publish `analyzer
11.0.0`.
Maybe deprecate `NamedCompilationUnitMember.name` and migrate to
subclass specific `name` or `namePart` properties before publishing
`analyzer 10.0.0`. This part is not breaking per se.
* Deprecations in `ClassDeclaration`:
* Properties `leftBracket`, `members`, `rightBracket` are deprecated, use `body` instead.
* Properties `name`, `typeParameters` are deprecated, use `namePart` instead.
* Deprecations in `EnumDeclaration`:
* Properties `leftBracket`, `constants`, `members`, `rightBracket` are deprecated, use `body` instead.
* Properties `name`, `typeParameters` are deprecated, use `namePart` instead.
* Deprecations in `ExtensionDeclaration`:
* Properties `leftBracket`, `members`, `rightBracket` are deprecated, use `body` instead.
* Deprecations in `ExtensionTypeDeclaration`:
* Properties `leftBracket`, `constants`, `members`, `rightBracket` are deprecated, use `body` instead.
* Properties `constKeyword`, `name`, `representation`, `typeParameters` are deprecated,
use `primaryConstructor` instead.
* **Breaking Change:** While the deprecated members mentioned above still exist in the AST,
their parent nodes have changed. This means that code relying on specific parent-child
relationships for these nodes might break.
Bug: https://github.com/dart-lang/sdk/issues/61701
Change-Id: Ic48104da8b029c9b454bbd2336574b7823025565
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461841
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-11-17 08:57:36 -08:00
Konstantin Shcheglov
e0d12a8d00
Fine. Use 'withFineDependencies: true' in analysis_server/.
...
Change-Id: I13fb9e2e8dfaca2e6eeca286e415c6df4bc10094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/462240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
2025-11-14 15:07:31 -08:00
Sam Rawlins
76c35b2f11
DAS: Rename constants in code_completion tool to use lowerCamelCase
...
Change-Id: I993d9386c63766471dd8d5ae7f1e63f3f9bf8ce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459844
Auto-Submit: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
2025-11-07 11:32:56 -08:00
Sam Rawlins
ac841ae559
DAS: use lowerCamelCase names in top-level driver
...
Change-Id: I24a99d8b94b291ab0c306456f89ff6cdcd4d148b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-10-29 08:37:10 -07:00
Konstantin Shcheglov
327fcf0110
Elements. Use 'LibraryElement.uri' directly, not through 'firstFragment' or 'source'.
...
Change-Id: I69c76ff233efcebd93c0129b8c860b10521f2b48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/449068
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-09-11 11:49:06 -07:00
Sam Rawlins
33f664940a
Bump DAS to use Dart SDK 3.9.0
...
Change-Id: I04bc285d822a657adb5573c6de3eb38655ab0fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448232
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-09-03 12:56:29 -07:00
Brian Wilkerson
587cbed231
Convert the completion metrics tool to use candidate suggestions
...
The tool was previously using the old implementation, which is now only
used by the Cider support. As a result, it wasn't providing valid timing
measurements for the new implementation. That's been fixed.
The map/reduce functionality is not yet supported, but it's also rarely
used. There's some information missing, but most of the functionality
works as expected, and I'd like to tackle the rest in a separate CL
(though I don't know exactly when I'll get to it).
Change-Id: I98150c1d5273a8ffaccf7858f9588e52e11636c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/444183
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2025-08-07 09:03:20 -07:00
Fedor Shcheglov
1a88edceb7
Deprecate redirectedConstructor2, superConstructor2, children2, displayString2, getExtendedDisplayName2, isAccessibleIn2, thisOrAncestorMatching2, thisOrAncestorOfType2, constants2, field2, typeParameters2, children3, asInstanceOf2, instantiateInterfaceToBounds2, and instantiateTypeAliasToBounds2.
...
Change-Id: I82004d5d1c758aae51ec8c97645aa53ed8cc52bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-07-09 07:13:51 -07:00
Fedor Shcheglov
247ae2364f
Deprecate Element.name3, use name instead.
...
Change-Id: I24a5e4a519b9f3bf755912f21a5c192edd1dd4ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/439381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-07-08 14:13:49 -07:00
Fedor Shcheglov
ab49c6e912
Deprecate getters and methods within analyzer/lib/src/dart/ast
...
Change-Id: I100b713897275e0a76bca5e669f73786a2a94ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-06-30 14:28:51 -07:00
Fedor Shcheglov
1400bd0a04
Deprecate type_provider's getters ending in 2, and rename TypeProviderImpl.functionElement2 to functionElement.
...
Change-Id: Iac9659aaed0dcd92e4cf13f9859dea2bf7b47f47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437582
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-06-27 17:53:00 -07:00
Fedor Shcheglov
ade10f4afb
Deprecate 'Element.library2', use 'library' instead.
...
Deprecate `LibraryElement.loadLibraryFunction2`, use `loadLibraryFunction` instead.
Change-Id: I117fb182e6bb62c1a76b3d578c0a6d4b6f32b9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435920
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-06-24 17:23:11 -07:00
Fedor Shcheglov
318aeb322b
Deprecate DartType.element3, use element instead.
...
Change-Id: Idef9da09c565a05fa84869f7433df3c24c6fbb5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435521
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2025-06-24 07:23:11 -07:00
Sam Rawlins
5c7cb4fdbd
analyzer: Deduplicate some code around lists of diagnostics into shared helpers
...
Change-Id: I233977c08c071c6280b2eefc086f3f6fb2964a54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433640
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-06-10 09:47:42 -07:00
Sam Rawlins
7b42aae99f
analyzer: Deprecate AnalysisResultWithErrors.errors in favor of .diagnostics
...
Also rename UnitAnalysisResult.errors (package-private API) to .diagnostics
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I0bdd7c9c19cff3bff9ee61fe4689564a7b5b727b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433581
Reviewed-by: Ryan Macnak <rmacnak@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-06-09 15:51:01 -07:00
Sam Rawlins
b2beba242d
analyzer: Convert callers of InheritanceManager3 to use InterfaceElement API
...
This includes all callers in analysis_server and analyzer_plugin. And
callers of `getOverridden4`.
Change-Id: Ia744f6c7260b445c6b1e02d3cf5515aaa9c7feeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/432962
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-06-04 16:30:22 -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
7eea262f06
Deprecate NamedType.name2, use 'name' instead.
...
Change-Id: I27725e1530c60a6aa2e197b97e027de1238c964a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427980
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-05-12 08:35:59 -07:00
Sam Rawlins
eb03a1673d
DAS: Use Diagnostic in place of deprecated AnalysisError
...
Work towards https://github.com/dart-lang/sdk/issues/60635
Change-Id: I0107a65580bc41d769c2a384319225b256df2fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2025-05-05 09:35:18 -07:00
Sam Rawlins
4ef2725654
Add an analyzer_testing package
...
We intend to publish and maintain this as a set of testing-related
utilities for the analyzer packages and for analyzer plugins.
Work towards https://github.com/dart-lang/sdk/issues/55660
See the doc: https://docs.google.com/document/d/1jRtd8B1ijPAP6Pz89HRnyIZXw2VMjaZx0vRZTpoNO84/edit?tab=t.0#heading=h.2sz41a544qhi
Change-Id: I2764b1357a932fa955060b26d78038997eaa9536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425080
Reviewed-by: Slava Egorov <vegorov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2025-05-02 06:58:49 -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
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
Sam Rawlins
5d1f4876ee
DAS: Fix many non_constant_identifier_names violations
...
This lint rule is a core lint rule; we have suppressed it only for
pre-existing code reasons.
There are a few individual files which simply have a consistent pattern
of including underscores in some names, so I add inline ignores there.
Change-Id: I89e6010203868fc10fda12b15353de41881d9b15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416900
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2025-03-20 09:00:06 -07:00
Brian Wilkerson
5454e70ce2
[migration] Rename utilities in protocol_dart.dart
...
Change-Id: I90c06dffcac98bc8ec6bb2a982a6825157eda56d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407620
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2025-02-03 16:32:40 -08:00
Konstantin Shcheglov
8eb24f0724
Elements. Make 'get library2' non-nullable in more places.
...
Change-Id: I0f9a27ce61367826fb1a1af3969cef0014639a31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398740
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-12-04 20:13:12 +00:00
Keerti Parthasarathy
44a8f14932
[Elements.migrate] Migrate FeatureComputer
...
Change-Id: Iff5c9cffd676464454460ca2a51cdd7cd0e1d507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397040
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-11-22 22:21:29 +00:00
Konstantin Shcheglov
359aa743ff
Elements. Add LibraryElement2.uri
...
We used it often enough, and the question "what is the URI of the library" makes sense.
Change-Id: I58baebd7b32154ae7a2f90770e4edcade8a49a63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-11-15 21:52:00 +00:00
Sam Rawlins
73443c8603
DAS: Generated protocol 'enums' can be real enums
...
File sizes are reduced:
```
analysis_server_client's protocol_common.dart - 132k -> 102k (-23%)
analysis_server_client's protocol_generated.dart - 453k -> 433k (- 4%)
analysis_server's protocol_generated.dart - 528k -> 509k (- 3%)
analyzer_plugin's protocol_common.dart - 139k -> 108k (-22%)
```
Change-Id: I8018f1d09e053c9d3df340ba31cdb07cbd29acf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/392842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-11-07 17:27:18 +00:00
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
Konstantin Shcheglov
3af9430ebf
Elements. Separate Element2.name from Element.name by renaming to 'name3'.
...
They were intersecting at ElementImpl and Member(s).
This will unblock updating implementations to make them nullable.
Change-Id: Ic9907eaa0ef08c096839f212668fa1e3d92bbf3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391540
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-10-23 15:53:40 +00:00
Konstantin Shcheglov
15ab56922e
Elements. Make more Element2.name nullable.
...
For example `MethodElement2.name`, for code:
```
class A {
() {}
}
```
Change-Id: Id023d6641d2d3685bf8e2d381aab055365e687d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-10-22 17:16:29 +00:00
Brian Wilkerson
83dc895d18
Migrate the remaining files in server's tools directory
...
Change-Id: I8388cde7fc9f7904324b41a3fff31cec88e42a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390804
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-10-18 17:03:00 +00:00
pq
fe66b2d525
[cq] move flutter extension to analyzer
...
Making this available in analyzer will allow me to de-dup a bunch of similar logic in the linter...
Change-Id: Id9991eb3b3a11fed4eff596302beffb814ba86bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Phil Quitslund <pquitslund@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2024-10-16 17:24:56 +00:00
Konstantin Shcheglov
8de1422a0e
Parts. Deprecate Element.enclosingElement, use enclosingElement3.
...
Change-Id: Iadc4ed02d4bda3b882e65dc6f4d263a6a938e0fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-09-01 18:50:29 +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
Brian Wilkerson
b0dabf03da
Fix a bug in the completion metrics tool
...
Change-Id: I890fbc5ca722f839b7e375ba4fbc41700c629566
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372521
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Keerti Parthasarathy <keertip@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-06-20 18:10:59 +00:00
Brian Wilkerson
45835b0933
Use the max number of suggestions to limit the number of candidate suggestions being retained
...
Change-Id: I4a60569fb4efe4af576b9adbb375c6e2e0b1727c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370720
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Keerti Parthasarathy <keertip@google.com >
2024-06-11 17:03:05 +00:00
Konstantin Shcheglov
017bed7b9a
CQ. Enable unnecessary_final in analysis_server/
...
Change-Id: Ieb62a1c774a5e8f5a22deaa8e8e5fff6f9f849dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Phil Quitslund <pquitslund@google.com >
2024-05-16 21:20:28 +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
Sam Rawlins
cda4f034ed
DAS: Extract static code from static class Flutter.
...
Most methods are refactored as extension methods. Some unused ones are deleted.
Some are inlined into their call sites.
Change-Id: I47826fd3241db86526efa2ee410990a0fc7be702
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2024-04-12 19:28:54 +00:00
Konstantin Shcheglov
5543d88289
AE. Deprecate OnClause, use MixinOnClause instead.
...
Change-Id: I938a1ff4046851c46c6ae4cebdff25e05e88300f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-04-02 23:02:22 +00:00
Konstantin Shcheglov
c5f876b7aa
Augment. Use ExtensionOnClause in ExtensionDeclaration, make it optional.
...
Change-Id: I696ffd0b8e8f3bf9017b583d480313ec7c7753f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-04-02 16:12:00 +00:00
Konstantin Shcheglov
22873be577
Completion. Benchmark for continuously asking completions.
...
Useful to focus on measuring performance of computing suggestions
only, without any overhead of resolution, protocol conversion, etc.
To be run as is, or with `--observe:xxxx` to see what to optimize.
You need to supply your own Flutter checkout.
Change-Id: Ie143b4ec9c24e05a0de2a14c1b8f0e1c20ef3a8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/358222
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-03-18 22:56:10 +00:00
Konstantin Shcheglov
d918ac16b3
Completion. Cache 'inConstantContext' value.
...
For package:collection, computing measures.
Before: 0:01:00.236000
After: 0:00:55.977000
So, about 7% faster.
I think this translates into actual completion speed up.
Change-Id: I45f0c0186d5988e6e1b043d465030668cd61335b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/357982
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2024-03-15 20:38:36 +00:00
Konstantin Shcheglov
94abcc81ab
Completion. Use CompletionSuggestionBuilder in completion metrics, faster.
...
For sdk/pkg/analyzer_cli
Before: 0:01:32.542000
After: 0:00:33.254000
So, about 3 times faster.
Change-Id: I8eae44eeefd5624f88a42fe37b8ae1c29427ee49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356310
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-03-15 19:08:23 +00:00
Konstantin Shcheglov
8705a06e21
Completion. Remove localVariableDistance(), and usage in RelevanceDataCollector.
...
Change-Id: I4ad00d1820fa996dac0abdb13649418a2fa97ed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2024-03-07 22:04:18 +00:00