Commit Graph

7206 Commits

Author SHA1 Message Date
Sam Rawlins 7d5f0a6508 DAS: Simplify fields in AnalysisServer
Many fields in this class are initialized in the class body, which is
unfortunate but seems necessary. However, such fields can often be
marked final, which makes the life cycle of such fields more clear:
contextManager, analysisDriverScheduler, pubPackageService.

Also, searchEngine can be a late final field wtih an initializer.

The analysisPerformanceLogger field is unused outside of the
constructor body in which it is declared; can be deleted.

isFirstAnalysisSinceContextsBuilt can be made private.

`_getByteStorePath` is also moved out to be an extension getter; it was
an instance method, but only uses the one OverlayResourceProvider.
Logically the function is just extracting a value from an
OverlayResourceProvider.

Change-Id: Ib08693ef16221560a1f14279725d9d44f9f5f99c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-09 11:52:34 -08:00
Sam Rawlins 7cbec8916d DAS: Privatize and finalize fields in AbstractNotificationManager
Change-Id: I0613c2fe4f4355d49cedf7262d870a1336a4225e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-09 11:47:48 -08:00
Konstantin Shcheglov 2766858fba Elements. Migrate lib/utilities/change_builder/change_builder_dart.dart
Change-Id: I0351cc1e4ecd88cf584e8a53f2fec7e2d1126c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403706
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-09 09:47:11 -08:00
Sam Rawlins 1790fb7908 DAS: Fix comment references in refactoring/
Change-Id: Iaf710c67029cc75e2e61c4c5761c790938a9113d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403560
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-09 09:39:58 -08:00
Danny Tuppeny 6a1f9ed029 [analysis_server] Insert new arguments before last child/children arguments
Usually when adding arguments, we'd always put them at the end. However there is convention (and a lint) for putting child/children last - so if the arguments in the last position are child/children, we should insert before them.

Change-Id: Ia0e0cd6b10f16cef30aa0cfe4fdedecc223f08c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403584
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-08 18:03:34 -08:00
Danny Tuppeny e9a6d62fa4 [analysis_server] Return EditableArguments in parameter order
Originally we put those with arguments first so that in the property editor they'd be at the top. However the results in the order changing if you add/remove them, and across widget instances.

Returning them in source order keeps the consistent (and allows the "more important" ones to be at the top), though nothing prevents having a different sort (or an option to change it) on the client side.

Change-Id: I4808f0cb2ae5fcbb6d5496aa736528e60ac7c935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403582
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-01-08 17:39:44 -08:00
pq edde03955b [element model] migrate element_visitors_test
Change-Id: I5eb336b52380de3ad49d0dd9bced1f0dc7fc1cb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403720
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-08 15:02:23 -08:00
Danny Tuppeny 11f53fd7d2 [analysis_server] Preserve existing quote kinds when updating string arguments
The original code tried to predict the "best" kind of quotes based on the string value (for example changing to double quotes when the string contained a single quote).

Since, we decided it would be better to try to preserve the existing quotes the user picked (this results in less of the string changing, and preserves user preferences/lints).

In some cases we can't preserve the exact delimeters, because if the string is a raw string but the new value contains the delimeter, we can't escape it, so we drop the `r` and escape anything that requires it.

Change-Id: I9a224ade5edd5bd558310b78be132fc9addd3ed3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/398885
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Elliott Brooks <elliottbrooks@google.com>
2025-01-08 14:54:20 -08:00
Konstantin Shcheglov 8785c4e000 Elements. Migrate lib/utilities/range_factory.dart
Change-Id: I218603ef0f3a9eae8bde3889cb22fa7f59000e38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403623
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-01-08 14:46:17 -08:00
FMorschel 26a2bf20b7 [DAS] Fixes for static declarations on Go to Imports command
R=brianwilkerson@google.com

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

Change-Id: I63f56e770bc53f7fc0f03e1c31a5c2b6b2fb7d54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402540
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
2025-01-08 13:49:38 -08:00
Konstantin Shcheglov 609f2f95b1 Linter. Issue 59814. Report unnecessary_async.
Bug: https://github.com/dart-lang/sdk/issues/59814
Change-Id: Iebf90315e7c443e00ea84c380f85ac6c84bc86c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403320
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2025-01-08 13:24:49 -08:00
Konstantin Shcheglov 810eeb4465 Elements. Migrate lib/src/dart/ast/element_locator.dart
Change-Id: I7b57a239cd21737292224d05b38b86a0dbd4643c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403642
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-08 13:21:29 -08:00
pq 2258ea7ec2 [quick fix] new correction for unnecessary_underscores
Bug: https://github.com/dart-lang/sdk/issues/56595
Change-Id: If7faeca31b4340fcd4b7d5f4642caf284cf36308
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403383
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-07 13:42:39 -08:00
pq 876752e40f [CQ] add feature isEnabled utility
Change-Id: I267aee8da50ec073a28bdb22ebe5379d31b1dc91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-01-07 13:18:28 -08:00
Konstantin Shcheglov a5468363c6 CQ. Remove unnecessary 'async' where no 'await'.
Change-Id: I58f56c098c9cec753325ab56d0aad37e1fde0ec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403082
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-07 10:08:11 -08:00
Sam Rawlins 1830689c80 DAS: Correct comment references in services/
Change-Id: I4d896e4e917311513a725460f95ca5561bc80ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-07 08:03:49 -08:00
pq 259bf2445d [lint] unnecessary_underscores core implementation
(TODO: follow-up w/ improved documentation.)

Bug: https://github.com/dart-lang/sdk/issues/56595
Change-Id: I000ccf9012c659d7fbc942d8bc0fafce87dafc5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-06 16:20:18 -08:00
Konstantin Shcheglov 125ef4373d CQ. Remove unnecessary 'async' where no 'await'.
Change-Id: Ic19aa901b0451d93f05cefc1d12d6e7fc6d58468
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403261
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-06 15:16:40 -08:00
FMorschel 1c4d7e1d4d [DAS] Fixes multiple fixes for insertions in multi-file library
Merges the test in https://dart-review.googlesource.com/c/sdk/+/401840 that is related to https://dart-review.googlesource.com/c/sdk/+/401180, but in the LSP handler where it can be more easily debugged.

R=pquitslund@google.com

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

Change-Id: I03874be3671dfbfa65a2f0b9f3916ecafcad9400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401865
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-01-06 13:50:12 -08:00
Brian Wilkerson 36e605d014 [Migrate] flutter.dart (extensions)
Change-Id: I9546d82fd8bd307a06ca9b56ca38a7c4d8cbbce6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403140
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-06 10:39:48 -08:00
Brian Wilkerson 8b9428b320 [Migrate] edit_get_available_refactorings.dart
Change-Id: I18a89fafdd9badd51cb852c840b0da04227ca3d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402901
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-01-03 11:05:18 -08:00
Brian Wilkerson 9d040aaea9 [Migrate] move_file.dart
Also removes an already migrated file from the list.

Change-Id: I76b88802b7867abe77867713166b048ee7b8cb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402882
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2025-01-03 10:15:49 -08:00
Sam Rawlins fe9c469a3d DAS: Correct some comment references
Change-Id: Iec84f23655298662eef0b0e44f7bb8586348833d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402423
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-03 09:47:19 -08:00
Brian Wilkerson c02b3a4ea8 [Migration] occurrences_dart.dart
Change-Id: I55f821655ed5f2430e752748231bdf1a1c0279e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-01-03 09:09:59 -08:00
Konstantin Shcheglov 2d23904694 Issue 57018. Fix for inlining a getter when it is the target of a prefixed identifier.
Bug: https://github.com/dart-lang/sdk/issues/57018
Change-Id: I5a421d21e12b6b830796383a5dcb97dd01f3dac1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-03 08:35:48 -08:00
Devon Carew 7b13bf7541 [analysis_server] move package:matcher to a dev_dependency
Change-Id: Id4ed2ea8c960ca35bb1abbe74fdf2a711baf3c1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402586
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2025-01-02 18:41:22 -08:00
Brian Wilkerson 242a20e64b Remove an unreferences assist kind
Change-Id: I4accda710fececceff2fae3ba5a8014a89e504d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402760
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-01-02 16:32:59 -08:00
Konstantin Shcheglov 5dc0e3cd3d Issue 57019. Fix for inlining method expression into interpolation.
Bug: https://github.com/dart-lang/sdk/issues/57019
Change-Id: Ib69093db3fdfb6e8f4cf3d7a8e6036fda59faf97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402587
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-01-02 16:25:58 -08:00
Sam Rawlins d3fed4088b DAS: Clean up some broken comment references
Change-Id: I319620941b6051b138326cab9bbb8985b43216eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402426
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-12-30 11:56:34 -08:00
Sam Rawlins a3ef4553a5 DAS: Small fixes for LegacyAnalysisServer docs and ctor
* Fix two comment references
* Mark AnalysisServer().enableBlazeWatcher as `@visibleForTesting`.
* Use named super parameters where possible.

Change-Id: Ic2561c7dd1a661857fbe2e7577fb29c55a5d57b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-12-26 12:19:14 -08:00
Konstantin Shcheglov c01fe77e57 Elements. Changes for google3.
Change-Id: Ia0215da239c3948ccd242e583b79df0085109597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402400
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-12-25 20:10:49 -08:00
Danny Tuppeny 3557eb4a26 [analyzer] Remove Element2.location
The completion code was no longer using this (we use `ElementLocation2` directly in the completion handler now), and the navigation check was just to ensure we didn't include MultiplyDefinedElements in navigation results.

Change-Id: I8412ec60d3d56386a7ced3d78c3a7428313df5d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402101
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-22 12:55:56 -08:00
pq 8a08c1bc56 [element model] migrate session_helper API
Change-Id: Ia2717bb24c83a409e853fb5271a3d5ed91cd3306
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-20 13:56:49 -08:00
Sam Rawlins e4b9170ca4 DAS: Support more possible added return types.
* If there are no return statements, suggest a `void` or `Future<void>`
  return type.
* Visit yield statements as well, to suggest proper return types in
  generators.
* Combine the 'return type computers' in extract_method.dart and
  add_return_type.dart int one.

Change-Id: I223a50b11e7e77183f166c193fa74b8a2800127e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401862
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-12-20 13:18:00 -08:00
Halil Durmus 1a8afa6bbf [vm/ffi] Allow omitting native types for @Native functions
This change simplifies working with `@Native`-annotated functions by allowing the native type to be omitted when it can be inferred from the Dart function's signature. While this was previously supported for `@Native` fields, it now applies to functions as well.

Before this change, you needed to specify the native type explicitly:
```
@Native<Void Function(Pointer)>()
external void free(Pointer p);
```

After this change, the native type can now be omitted if it's clear from the Dart signature:
```
@Native()
external void free(Pointer p);
```

TEST=tests/ffi/native_assets/*

CoreLibraryReviewExempt: VM only
Closes: https://github.com/dart-lang/sdk/issues/54810
Change-Id: Ied5407fcd2f49d85284cb7817f0c8cad2a73626b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400840
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-20 02:05:40 -08:00
Danny Tuppeny 76623a6541 [analysis_server] Extract TypeHierarchyItemLocation as ElementLocation2 and use for completion resolution
This moves completion resolution off `ElementLocation` onto the class recently created as `TypeHierarchyItemLocation`, which is now renamed to `ElementLocation2` and extracted to its own file.

Change-Id: I1f0b831ded7b08d6c09f97fcfd66f38f1dd4750e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401021
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-19 14:14:53 -08:00
Konstantin Shcheglov 9f82b8595d Elements. Migrate Change Method Signature refactoring.
Change-Id: I909adf258183d56be98895e07585ab079feafe6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401940
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-12-19 14:06:50 -08:00
Konstantin Shcheglov 143bbe0a05 Elements. Use identical() to compare ElementImpl(s), other elements.
Change-Id: If2abddeaea0551fa4646027ad8aa1bb4fd255660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401760
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-19 13:17:19 -08:00
Sam Rawlins cc34c05adb DAS: Add a fix for strict_top_level_inference
Change-Id: I990542bd6455113a70ead1d680f50b1163e6e263
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401800
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-12-19 08:58:29 -08:00
Devon Carew 79b52401f2 Update various packages based on diagnostics from strict_top_level_inference.
Change-Id: I032d10fd1956b62a9e45ceee9ca2b28c9863d1ce
Tested: diagnostic updates only change
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401560
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-12-19 08:23:51 -08:00
Danny Tuppeny 922ad1b95e [analyzer/analysis_server] Migrate navigation to new element model
Change-Id: I5cb132de15e103c5fdba22e7033317ee2013f886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399106
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2024-12-19 04:55:11 -08:00
Brian Wilkerson bda2cbbee3 [Migration] Minor clean-up
Fixes a couple of the places that would have become errors when
`ElementImpl` no longer implements `Element2`. There are other places
that will break, but some of them are dependent on other changes being
made first.

Change-Id: I1041d70909de27ff33ddabc25ffc92b405b2c6c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-12-18 13:56:11 -08:00
FMorschel 4e719de45f [DAS] Adds quick-fix for extension name
R=pquitslund@google.com

Fixes: https://github.com/dart-lang/sdk/issues/59723
Change-Id: I3679146ac70dd6bcb936c151cb93dacf8273d4b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401040
Auto-Submit: Felipe Morschel <git@fmorschel.dev>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2024-12-18 13:48:56 -08:00
Sam Rawlins 57c4da6911 Make Driver.instrumentationService private and final
Change-Id: I903c293771c6666e5f1b0f7dc2637abc51943849
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401580
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-12-17 17:49:29 -08:00
Sam Rawlins f934e392f2 analyzer: Remove unnecessary Driver.httpServer
Change-Id: I504f7f2ebf01a1a5e963374f3c0b4a66c2ed9d1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401383
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-12-17 17:35:10 -08:00
Danny Tuppeny 54d62b478d [analysis_server] Move Type Hierarchy off ElementLocation to its own internal uri/name encoding
This uses a simplified version of `ElementLocation` for `InterfaceElement`s in Type Hierarchy that are just made of Library URI + Name.

Change-Id: I2b5279f53d8eb199e31b3aed59e113c5f34e941a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-12-17 11:25:30 -08:00
Danny Tuppeny a9c3991a7a [analysis_server] Migrate LSP Find References to new element model
Change-Id: I07c78af854c573a759971ee16c21fdc7de376952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401060
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-12-17 10:27:15 -08:00
Danny Tuppeny 11904ed387 [analyzer] Add LinterContext.currentUnit and use it for content in eol_at_end_of_file
... instead of potentially reading the file from disk.

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

Change-Id: Id5939dce4d11429a929a4b63611ff1823449b64c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401424
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-12-17 10:19:59 -08:00
Konstantin Shcheglov a829a7e7ac Elements. Rename SearchEngine methods.
Change-Id: I3ffd1fe3e0983bd2dd0c76d37b3c9a2bb5969ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-12-16 15:09:38 -08:00
Konstantin Shcheglov de1662c292 Elements. Migrate lib/src/services/search/search_engine.dart and related.
Change-Id: I7c0501eb6e84313d3eb179f41e8bdaf6190004ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400860
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-12-16 09:21:14 -08:00