Commit Graph

9526 Commits

Author SHA1 Message Date
FMorschel 19da943583 [DAS] Fixes wrong prefixes
R=srawlins@google.com

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

Change-Id: I4a6597b174216dcdb8ce1801437b539e7f47136c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396563
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-11-22 23:30:24 +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
FMorschel 81a7acc8b6 [DAS] Fixes different aliased imports same element
R=brianwilkerson@google.com

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

Change-Id: I7038827ad0414e73e6af8f37f90d56cfcb6e76af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397000
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
2024-11-22 21:29:16 +00:00
Brian Wilkerson de9f1491ae Migrate inline_local
Change-Id: Id743d49f0691cb9f9b4415b234fdccad69a72c8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397102
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-22 21:26:05 +00:00
Brian Wilkerson f24e6f70b8 Migrate extract_widget
Change-Id: I2773545a72e1937cdafc085f3b1e76fbc049f173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397104
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-22 20:02:40 +00:00
Brian Wilkerson a33e3f2185 Migrate extract_local
Change-Id: Ie199575d643b6de80b17cf44f61d038c0cc11525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397103
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-22 19:56:21 +00:00
Brian Wilkerson b49464c885 Migrate inline_method
Change-Id: Iff0d8dac16c0ea8ede807a393276b980d4d5a7f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397101
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-22 19:43:19 +00:00
FMorschel 06111a51c5 Fixes create method inside record literals
R=pquitslund@google.com

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

Change-Id: I33e6d21099d4f6b64556b45df3fca5dbfa4d3ed2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396561
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-11-22 17:18:29 +00:00
Parker Lougheed f62c78b52c [analysis_server] Remove unused empty arrays from generated Java code
These aren't used by the IntelliJ plugins, outside of one usage that can  be removed.

Change-Id: I7827481a9e1d4d4e513e8e659ccc03c2bd3d9eae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-11-22 16:00:28 +00:00
Chloe Stefantsova 681a598145 [analyzer] Add tests for null-aware elements in code folding
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: Id558d12928ad6699ac434b4c0b5845662a97e7fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396860
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-11-22 07:50:58 +00:00
Keerti Parthasarathy f7c9899217 [Message scheduler] Implement handling one message at a time.
Change-Id: I2294a7f209414a499fce05c0180358ec271349fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/386581
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-22 01:12:11 +00:00
Brian Wilkerson cc99ae937a Migrate convert_getter_to_method and convert_method_to_getter
Change-Id: I550022d206f0043789551280b35a1768557cfe61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396625
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-21 23:11:16 +00:00
Parker Lougheed 527d982861 [analysis_server] Clean up generated Java code
- Removes the usage of Apache StringUtils (#39377)
- Remove now unnecessary guava Lists import
- Use instanceof pattern matching instead of casting
- Properly mark overridden toJson method as overriden
- Resolve TODO in generator code

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

Change-Id: I9d1d41af89e37042fd999d2786a2c145a907eb3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390629
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-11-21 19:54:30 +00:00
Konstantin Shcheglov ea81facb13 Elements. Rename 'LibraryElement2.functions' to 'topLevelFunctions'.
For consistency with the name of the item `TopLevelFunctionElement`,
as `List<TopLevelVariableElement2> get topLevelVariables` does.

Change-Id: I52f119493ecdfeb4005926c46f1ac14838a6d46d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396980
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-21 19:33:35 +00:00
Danny Tuppeny 5681cfa695 [analysis_server] Provide better values for active parameters in signature help
We were previously using a -1 because we don't support this, but it turns out the LSP spec changed from "number" to "uinteger" in v3.16, meaning -1 would violate some assumptions clients made.

For the case where we don't have a value, we now just use the `length` of the `parameters` list (eg. the first invalid value, which is valid according to the spec and can indicate to the client that there is no active parameter*), however I thought we could also do better by providing values for some cases (named params that we can match up, and positional params by counting only the positional params+args and matching them up).

\* The spec says clients can treat out-of-range values as 0, however VS Code doesn't highlight any parameters in that case, which is better IMO.

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

Change-Id: I1de7b0eaacf06aac7e302ae9095342f4e4d7a466
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-21 19:30:04 +00:00
Danny Tuppeny 9350b85b17 [analysis_server] Add a missing 'await' that may prevent handling of InconsistentAnalysisException
This test (without the code fix) reproduces an infinite loop in the GetFixes handler. There is error handling for `InconsistentAnalysisException` but it didn't appear to work (at least in some cases) because it's async and there was no `await`.

Change-Id: I835398062ea3da1386c2bc065bbdaf93cf10cdf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-21 16:04:47 +00:00
Chloe Stefantsova d6ddaf4325 [analyzer] Add tests for null-aware elements in closing labels
Part of https://github.com/dart-lang/sdk/issues/56989

Change-Id: I9d402523ea065eaac4c4edbba2461a2ed23cac27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396600
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-21 08:02:19 +00:00
FMorschel b02a11634e [DAS] Fixes ambiguous extension access fix for method
R=brianwilkerson@google.com

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

Change-Id: I84c73c6315c401bc5f8d925f190d395354329102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396741
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
2024-11-21 03:20:08 +00:00
Konstantin Shcheglov 6526f6c981 Elements. Add more type specific extensions.
Change-Id: Ia69931e1777111f2b2396e89c552317e51e6b809
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-11-20 23:12:44 +00:00
Keerti Parthasarathy f6e4b3e607 [Element.migrate] Migrate CompletionState
Change-Id: I08bb8ffc4fa079d1f5b126af5de3101673f1be55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-20 22:37:19 +00:00
Konstantin Shcheglov 1af77fa54c Elements. Add PrefixElementExtension.asElement2 and PrefixElement2Extension.asElement.
Change-Id: I76ae659a487392ddcfffa45c7cf2178ee8ca1b85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396623
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-20 22:29:29 +00:00
Keerti Parthasarathy 1833bab5b9 [Elements.migrate] Migrate RelevanceComputer
Change-Id: I0654cc8b95f1100f3d4884b3d6a8220c604d3513
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-20 17:08:28 +00:00
Konstantin Shcheglov 9f0968a909 Elements. Migrate FromEnvironmentEvaluator and FromEnvironmentEvaluatorTest.
Change-Id: Ic0d0026647a907dc50811ae331add07f042cb78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396423
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-20 15:23:40 +00:00
Keerti Parthasarathy c7d0e325d7 [Elements.migrate] Migrate CandidateSuggestion.
Change-Id: I664ab34e7c674582d98f3c75d3fffe41d8cf8be5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-19 18:14:27 +00:00
Danny Tuppeny d38e0ff148 [analysis_server] Migrate LSP "Go to Type Definition" to new element model
Change-Id: I4de207adc9301b2533885d51329ccc0b6600b86d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-19 18:07:04 +00:00
FMorschel 6dac184012 Adds library result
R=scheglov@google.com

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

Change-Id: I125c53e138c97e57fc22d69b2362351ddcbb6b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395420
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
2024-11-19 15:50:42 +00:00
Brian Wilkerson 779a433d55 Migrate four computer classes
Change-Id: I9d5a9cd8c85ef703938aecb4e233467917f73aac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396101
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-19 01:05:45 +00:00
Keerti Parthasarathy ad8c44f3d9 [Elements.migrate] Migrate LibraryElementSuggestionBuilder
Change-Id: I56dde963754fbaf5012f7229fa5a37441c210c4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-18 23:47:10 +00:00
Brian Wilkerson 478aba8bf2 Migrate flutter support
Change-Id: I52899ecc30b2db3e4990df523c2b0bbd19d46e95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395704
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-18 22:39:18 +00:00
Sam Rawlins e5274a522e DAS: Use new package:args API for less casting
Change-Id: Ib0fbdebb6c703202f13330d7bf53eade26fa73de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396040
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
2024-11-18 19:34:39 +00:00
Danny Tuppeny be7a40dd78 [analyzer] Ensure parseFileSync() flushes pending file changes
Fixes https://github.com/dart-lang/sdk/issues/57120
Fixes https://github.com/dart-lang/dart-pad/issues/3092

Change-Id: I803cdc19702bcd357cdafde3176ecad246495182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-18 19:05:29 +00:00
Konstantin Shcheglov 17a2f16926 Elements. Add PropertyAccessorElement2 and PropertyAccessorFragment.
I found a number of places where we need to access `variable3`, so
it might be convenient to have a common interface that provides it.

Still, there are many places where we want to know that this is
specifically `GetterElement`, to separate interfaces for them are
also useful.

Change-Id: Ib671dc3bdb9a04a022fd74921f8ccedcdba79643
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395701
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-18 17:36:50 +00:00
Konstantin Shcheglov 1293500b0c Elements. Migrate AssignmentVerifier.
Change-Id: I45a3c4df63250c611f011d61023ed74485145b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395780
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-18 16:57:21 +00:00
Konstantin Shcheglov b80fdcb683 Elements. Migrate ErrorDetectionHelpers.
Change-Id: I50b08924a4be96210378a9ad56a9d671a030d5f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-18 16:56:39 +00:00
Brian Wilkerson 73adec7b6f Migrate bulk_fix_processor.dart
Change-Id: I5385c0237d37ddf808609897dc846f100b11cd5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395703
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-11-16 15:26:19 +00:00
FMorschel 052c9852c4 [DAS] Fixes hover for mixin on abstract implemented type
R=srawlins@google.com

Bug: https://github.com/dart-lang/sdk/issues/57097
Change-Id: Ia67ebb1dbca9e8b3a63e2a26dbb7234385b4bdf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395562
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Felipe Morschel <fmorschel.dev@gmail.com>
2024-11-16 00:12:00 +00:00
Brian Wilkerson 34d945cb7c Migrate more server tests
Change-Id: Iee3e6b6db9c58e9fcf790e2874f73c8eac6e660d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395404
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-11-15 21:57:47 +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 3f7df09ddb analyzer: Rename analysis options YAML keys variables
We rename `AnalyzerOptions` to `AnalysisFileOptions`, and change it's
comment from "`analyzer` analysis options constants." to avoid anyone
thinking it is specifying options for the `analyzer` section.

Additionally I privatize some of the static values that are only
present for validation - they are not meant to be used outside of
`options.dart`: `AnalyzerSection._trueOrFalse`,
`AnalyzerSection._options`, `AnalyzerSection._strongModeOptions`,
`AnalyzerSection._languageOptions`, `LinterSection._options`.

I also rename `_TopLevelAnalyzerOptionsValidator` to
`_AnalyzerTopLevelOptionsValidator` to align with
`_LinterTopLevelOptionsValidator`.

Change-Id: I4f5735d8bda8edbaf066387b473c05969c3ba7d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395060
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-15 21:41:29 +00:00
Sam Rawlins 8aa0bf58ab analyzer: move constant-evaluation lint utilities to their own library
These utilities are distinct from the base classes like AnalysisRule and
LinterContext. And their import requirements are also distinct. Separating them
in the filesystem should simplify how we slice up the public API.

Change-Id: I365c48c41e5d3db1e3aa649fd70b94cd7da1b069
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395561
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-15 17:55:29 +00:00
Erik Ernst 7b71ed17b2 Introduce the lint unsafe_variance
This CL implements a new lint, `unsafe_variance`. This lint emits a
warning whenever an instance member declaration has a signature where
a type variable declared by the enclosing class/mixin/enum occurs in
a non-covariant position in the return type (including the type of
an instance variable).

Issues: https://github.com/dart-lang/linter/issues/4111, with goals related to https://github.com/dart-lang/language/issues/296 and https://github.com/dart-lang/language/issues/524.

Change-Id: I1352d71d61fece03a432ccf0d98825a69e3a457f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2024-11-15 09:28:52 +00:00
Sam Rawlins 3515a199ce DAS plugins: Start enforcing an analyzer constraint
Change-Id: Ie2f987edfd4da9c2e45298a65e645b9fb9f80670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395261
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-15 01:04:01 +00:00
Brian Wilkerson 843c47b9a1 Migrate more tests in analysis_server
Change-Id: I14885a2b5ea4fd89b14ae52124d800a2b24ccad0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395401
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-14 21:45:50 +00:00
Konstantin Shcheglov 44371eb9be Elements. Migrate ConstructorFieldsVerifier.
Change-Id: I107ca230fefeca373c64a7ca30a0df3ee99724f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395342
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-11-14 21:28:34 +00:00
Konstantin Shcheglov a1516ef998 Elements. Remove 'FunctionExpressionImpl.declaredElement2'
Change-Id: Ie398dc23d6d5911dd02104ca4b31114d5d657153
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395050
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-14 21:24:31 +00:00
Sam Rawlins fab7e4b643 DAS plugins: Simplify TestPluginManager
Using `noSuchMethod` is an idiomatic way to "implement" unimplemented members.

Change-Id: Ifec025fc41bd9965f7461330b27990621a3ad7d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395043
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-11-13 21:36:15 +00:00
Konstantin Shcheglov c8ff99dfb3 Elements. Omit '=' at the end of SetterFragment / SetterElement name.
Also fixes names where they were previously missing.

Change-Id: I2d16059e3871283de7c9373fb040d939bd5357ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394900
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-11-13 18:37:19 +00:00
Brian Wilkerson 8fa66a0a33 Migrate data-driven fix support
Change-Id: I8ac392d47c105225b22a32651693c3caa515eda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/395040
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-11-13 18:36:19 +00:00
Danny Tuppeny 2fbb33e4d8 [analysis_server] Fix handling of null responses for LSP requests over DTD
The DTD client requires that the `type` field is populated in DTD responses, but this code previously would omit it when the result was `null` (because it used `result?.runtimeType`).

Change-Id: I5a6e0927e9c02f2abb690aefceca8f8b003cd43b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-11-12 22:34:48 +00:00
Brian Wilkerson dfb25545c4 Rename LibraryFragmentInclude to PartInclude
Also renames associated getters, fixes some comments, and removes a
getter (`nameOffset`) that should have been `nameOffset2`.

Change-Id: I0dc4879c37ec14650d94933c14630176e4d1f57e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394386
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-11-12 22:23:28 +00:00