Commit Graph

604 Commits

Author SHA1 Message Date
Brian Wilkerson d00ef8611a Update the server protocol to support passing back the line and column numbers for the end of a range
Change-Id: I8310e4a32cacbe98310c1dbaa3b3563b1ff1a1ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191862
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-18 19:22:23 +00:00
Konstantin Shcheglov 53c8eda967 Keep more specific types for AnalysisContextCollectionImpl to avoid downcasts.
It seems to me that implicitly expecting DriverBasedAnalysisContext
is equivalent to explicitly stating this with types.

Change-Id: I16ec14e73030d9b34242a2f4ad582e93fc44afa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-06 06:23:25 +00:00
Danny Tuppeny 78dd7a4bb3 [analyzer] Suggest arg names in front of positionals
Fixes https://github.com/dart-lang/sdk/issues/40654.

Change-Id: I329d8b4af9371e8d61c4044bb003f9c22cd72c41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-04 18:21:19 +00:00
Danny Tuppeny f03ec46eff [analyzer] Detect completion inside comments at the end of file
Fixes https://github.com/dart-lang/sdk/issues/33183.
Fixes https://github.com/Dart-Code/Dart-Code/issues/3170.

Change-Id: Ia8c76ace89e424f5cca08120282e886e7567ee2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188462
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-02 16:25:04 +00:00
pq 94f6b6ec94 migrate multi-fixes to unique fix kinds
Change-Id: If28b89ebeab3be8120cb9189d7c54eb1393beb6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186741
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-25 00:24:35 +00:00
Konstantin Shcheglov 0a85156103 Remove Plugin.fileContentOverlay, use OverlayResourceProvider.
Change-Id: I44688e573b87ffd1d06726b5fad3346137610ad8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-24 06:48:39 +00:00
Danny Tuppeny a6c14e8848 [analyzer] Insert imports after annotation of first import directive in file
Fixes https://github.com/Dart-Code/Dart-Code/issues/3104.

Change-Id: Ic91727c11cda1436662a52b737094ea87927047c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-16 21:32:50 +00:00
Konstantin Shcheglov 875af7c991 Deprecated TypeProvider.futureType2/listType2/etc
Change-Id: Ia994be1e29b4d96b89d714beafcb9256a0cb4de6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-02-12 17:26:07 +00:00
Konstantin Shcheglov b4409ea3b4 Deprecate FunctionType.element/typeArguments
Bug: https://github.com/dart-lang/sdk/issues/44629
Change-Id: I5009a1abd456f33738d3b5e2ecae24b269b20000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182700
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-10 17:17:58 +00:00
Danny Tuppeny cc7bd35516 [analyzer] Support completing argument names in function expression invocations
Fixes https://github.com/dart-lang/sdk/issues/42064.

Change-Id: I186bef47771a56844833fc908c183358955e11ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-09 21:44:32 +00:00
Konstantin Shcheglov b68f37f311 [analyzer_plugin] Changed the analyzer version range to >=0.42.0 <0.43.0.
Change-Id: I7c91f05c8ac3518dd99ec3720607b6f8fbafba30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182622
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-05 01:31:12 +00:00
Konstantin Shcheglov 950234803b Update DartEditBuilderImpl.writeType() to support type aliases.
Change-Id: I560596384e8a8d422a013b6597ca9ab91c2d00df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182663
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-02-04 00:23:29 +00:00
Konstantin Shcheglov 9f986d2501 Migrate package:analyzer to null safety.
Change-Id: Iffe4370431587e46a141ddc72a86ceec29c163b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176486
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-02-01 18:56:04 +00:00
Brian Wilkerson 216b9d65d8 Change the range of values for features so that features are never disabled
I believe that this approach will make it much easier for us to make
changes to the ranking order for some suggestions without significantly
changing the ranking order of others. In particular, adding a negative
feature for a subset of suggestions (such as decreasing the rank of
methods named 'noSuchMethod') currently has the effect of decreasing the
rank of everything that isn't a method. This solved that problem by
giving all features a baseline of zero and allowing features to either
increment or decrement the rank from there.

This CL has minimal overall impact on ranking except in the following
areas (values are the inverse mrr):
- keyword void, which regresses from 150.766 to 237.838 (87.071 points)
- local function, which regresses from 24.941 to 173.016 (148.075 points)
- prefix, which improves from 386.455 to 361.611 (24.844 points)
- type parameter, which improves from 269.235 to 249.489 (19.746 points)

The change to 'keyword void' largely shows up in return types of function
declarations, but interestingly enough has little impact on the return
type of method declarations. We might be able to offset this by treating
`void` (and `dynamic`) as types rather than as keywords. I've added that
work item to the list.

The change to local functions doesn't appear to impact any individual
location significantly, and might not be significantly detrimental
because local functions are probably not all that common.

Change-Id: Ifc7002cd6a9d656792ad4ffd76d96df2ab50e4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-02-01 16:00:58 +00:00
Konstantin Shcheglov 5c426d8d43 Add Element.aliasedType to the protocol.
R=brianwilkerson@google.com

Change-Id: I95fb2c9d50096f90913c4d6670ce0841095fe6a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-27 23:27:21 +00:00
Brian Wilkerson 8cf4c15bf0 Update the context location label for general type alias support
By the way, I didn't actually regenerate the table, I just hand edited
it. We don't have any way to ensure that the checked in table matches
what would be generated because we can't have the code used to generate
the table available on the build systems (or every developer's machine).

Change-Id: I4b645f3a276f23bab469e5daf2325cc8f2d0bce4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181441
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-27 22:38:07 +00:00
Konstantin Shcheglov 3a5294c7e6 Fixes and tests for completion in non-function type aliases.
Change-Id: I69cf74380fc1c251e0f44334fdff17f327cafeaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-27 19:27:35 +00:00
Nate Bosch 6e1a0b08c7 Update to null safe package:html
Change-Id: I667efbe0f895628130bc695e96a7f95a991c2e9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181040
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-01-27 18:41:10 +00:00
Konstantin Shcheglov 4a5ac9df57 Support for non-function type aliases in convertElement() and test navigation.
Change-Id: Ic2dcf6ad3faaf6712fdcbbe5197f332b6ba42e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-26 06:40:00 +00:00
Brian Wilkerson 8ee08e1128 Clean up some docs from the analyzer_plugin package
Change-Id: Iea3e8233641fb294ca1006a7b68178c439cc5e4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180780
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-26 00:03:16 +00:00
Konstantin Shcheglov 40b9650b67 Add ElementKind.TYPE_ALIAS and HighlightRegionType.TYPE_ALIAS to the protocol.
Change-Id: Ia4991d4f657f4bfa5e244d9c3b126e89571b9e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180660
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-25 18:42:03 +00:00
Sander Kersten 089ca8c1eb Make compute assists async and fix message
Fixes #44730.
Fixes #44731.

For "fixes" there were similar bugs that I've fixed as well.

Closes https://github.com/dart-lang/sdk/pull/44758
https://github.com/dart-lang/sdk/pull/44758

GitOrigin-RevId: e08b25ea2890fc6f796c9cc0411fe7a71eaf70b9
Change-Id: I026c325d9d362775e178a7621a17ce6ff919ed40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-23 17:58:57 +00:00
Brian Wilkerson 9c7064e96e Remove unnecessary awaits in analyzer_plugin
Change-Id: Ifc68d638d082d73495cd5184ea1270c2551d588d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180382
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-01-21 18:01:50 +00:00
Danny Tuppeny b94adb2bc2 [Analyzer] Add folding regions for comment blocks
Change-Id: Iafe70e977065dc68230503349b8ba3abe9b4c0c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179777
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-01-20 16:23:45 +00:00
Danny Tuppeny d901213061 [Analyzer] suggest type names in field declarations where fields may have been parsed as field names
Change-Id: Ie31cc3bae86538ea5580627851a7b7d95571a5d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179771
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-19 22:26:14 +00:00
Konstantin Shcheglov b1196f7389 Use resolveTestCode() and resolveTestFile() in analyzer_plugin as in analysis_server.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I8d2a1dcc98bd58d00d4fed842174df4e9ca9f1d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 17:15:33 +00:00
Konstantin Shcheglov d2f2f734bf Replace findElementsByName() with FindElement.
Change-Id: Ia7b9d6785eb0d727c2bebee2b94fc6258b50d71c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179365
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-01-15 01:10:24 +00:00
Brian Wilkerson 5c174c8d8c Remove unused data from AssistKind
Change-Id: I71c21e4d8138fa7f92d1a3e5a919b9fff3b2098f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/177980
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-01-07 23:16:48 +00:00
Konstantin Shcheglov 9717c775e4 Deprecate FunctionTypeAliasElement.function
Change-Id: Id629afa92c6681ba796aed75b24c4251fd86810f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/176140
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-14 22:26:29 +00:00
Danny Tuppeny 0fa6674ea9 [Analyzer] Include required-named params in defaultArgumentListString and LSP complete-function-calls
Change-Id: I8b4c09305df6e868e7447c538be4a3b540aa7e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174802
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-08 20:47:04 +00:00
Brian Wilkerson ce74d6e4ed Restore generation of protocol_common in analysis_server_client
Change-Id: I897380a721c669671b2207b74587b61ed56f23f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175183
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-12-06 04:59:04 +00:00
Konstantin Shcheglov 08ae001fdf Prepare to publish analyzer_plugin 0.4.0
I updated the analyzer version rage because de-facto tests don't
run on `0.39.12` anymore.

Change-Id: If7413b9ad9b660f3f50ccc475d7f3b35fe3cd324
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174567
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-03 17:49:53 +00:00
Sam Rawlins e0ebe30190 analyzer: Improve unused_import analysis for shared prefix names
Fixes https://github.com/dart-lang/sdk/issues/38784

Change-Id: I42b32261e9ed71018967e228d2ec731a4613205d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147336
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-03 04:00:37 +00:00
Janice Collins 951046f94b Update lower SDK constraint of analyzer packages to 2.9.
2.9 is two stable versions behind current, as discussed in
the analyzer standup.

Change-Id: I403460ff1621ccfa07192ae4dcf3fa89bf45b152
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174861
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-02 22:48:57 +00:00
Sam Rawlins 3199acc82c Remove use of useFasta flag from analyzer_plugin
The analyzer is always using fasta now; this flag is going away.

Change-Id: I7f0ed80621032e41d1f4a3350f08e7e7055b7b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-12-02 16:59:58 +00:00
Konstantin Shcheglov f950d94762 Simplify addSource() in analyzer_plugin/ tests.
Change-Id: Ib3810608ceaace11a3befcb2b6ceb6f7a527a9c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-28 05:12:47 +00:00
Konstantin Shcheglov 25b80442d4 Enforce that only Dart files can be changed after analysis in AbstractContextTest in analyzer_plugin/.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I2aefc2f4d2035d9e37ca36bf0c8ffc965a00aad9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174225
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-28 05:04:41 +00:00
Konstantin Shcheglov 6e311941bb Clean up WithNullSafetyMixin in analyzer/ and analyzer_plugin/.
Bug: https://github.com/dart-lang/sdk/issues/43837
Change-Id: I2282d0230e5ea0abdd2a08de2a16cfaa602c3cc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-28 04:56:46 +00:00
Danny Tuppeny a0cc6c9819 [Analyzer] Add a new CompletionSuggestionKind for Pub package names
Change-Id: I73fad5c793249a8ee0e30c1ce198b5adf7ff429a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174128
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-27 17:38:16 +00:00
Brian Wilkerson c6126c34e9 Suggest previously missed type parameters
Change-Id: I09361984b7a58a281769e5feb04aeb1656620237
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173880
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-11-25 00:13:49 +00:00
Brian Wilkerson 32d0d625b3 suggest loop variables defined in for elements
Change-Id: Ie01dabd21b5a37b07d965fc78876a2876b57ce4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173840
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-24 21:51:09 +00:00
Sam Rawlins 19a96e4d5e Analyzer: override element type in ExportDirective and ImportDirective
This reduces the number of explicit casts needed for null safety.

Change-Id: I8ad0ab9cddbbe81e5fbf66b95ae4ae1cb57efebc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172743
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-20 15:22:46 +00:00
Sam Rawlins 0a4685822f analyzer_plugin: Remove unused imports which share a prefix
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: Ia1c1b2774ae483d30278dea4ee9d069104f7f1a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-16 20:09:46 +00:00
Brian Wilkerson 9f6ea5b6f6 Remove an unused import
Change-Id: Ib5c9997a309353baa2b11c8e36c4b1bfafd59c98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172025
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-15 17:57:47 +00:00
Brian Wilkerson c3f96e863f Remove uses of useNewRelevance and clean up associated code
Change-Id: I04dd3b33d229348042609c5a656d1ad68a95913d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-15 00:18:07 +00:00
Paul Berry 7d3bc4862d Rename pkg/analysis_tool to pkg/analyzer_utilities.
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.

Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 17:46:30 +00:00
Devon Carew 2f9cb8e81b Remove support for v1 of analysis highlighting.
Change-Id: I65bc645de9565628d82d1ff969616f3e38582275
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171682
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-12 18:36:19 +00:00
Paul Berry cd05ad0009 Share and improve implementation logic of verify_tests_test.dart
This CL unifies the implementations of `verify_tests_test.dart` found
in packages `analysis_server`, `analyzer`, and `analyzer_plugin`.  It
also enhances the functionality of the tests by having them detect
both missing and extra imports in `test_all.dart` files.

This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.

Change-Id: Id344eeb4ad514461cda622495651b1339f379022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-11 18:09:18 +00:00
Paul Berry 596198fb74 Share logic of package_root.dart
This CL unifies the implementations of `package_root.dart` found in
packages `analysis_server`, `analysis_server_client`, `analyzer`, and
`analyzer_plugin`.

This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.

Change-Id: I0da44edb379b8e929dd0b1c16a6989c1e9418acb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-11 18:09:18 +00:00
Brian Wilkerson 23478cb386 Implement a simple transactional model for change builders for use by bulk fixes
Change-Id: I4e7a3e13345a865a2302dfddbc9aa4eb7b531d15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171340
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-11-11 16:46:42 +00:00