Version 2.18.0-85.0.dev
Merge commit 'fe50796c6f228900dc2bf7a72623b439a4857a09' into 'dev'
diff --git a/DEPS b/DEPS
index 0ea6033..f05fe30 100644
--- a/DEPS
+++ b/DEPS
@@ -108,7 +108,7 @@
"dart_style_rev": "d7b73536a8079331c888b7da539b80e6825270ea",
"dartdoc_rev": "334072b0cad436c05f6bcecf8a1a59f2f0809b84",
- "devtools_rev": "8c525828ba33029ed664bf8ea2829b6e5370535f",
+ "devtools_rev": "6ca0b315ccafb7e2a5c6081063d28b546a0f7101",
"ffi_rev": "4dd32429880a57b64edaf54c9d5af8a9fa9a4ffb",
"file_rev": "1ebc38852ffed24b564910317982298b56c2cedd",
"fixnum_rev": "848341f061359ef7ddc0cad472c2ecbb036b28ac",
diff --git a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
index bca2807..c7ec048 100644
--- a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
+++ b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
@@ -198,12 +198,6 @@
}
} else if (declaration.kind == DeclarationKind.ENUM_CONSTANT) {
label = '${parent.name}.${declaration.name}';
- } else if (declaration.kind == DeclarationKind.GETTER &&
- declaration.isStatic) {
- label = '${parent.name}.${declaration.name}';
- } else if (declaration.kind == DeclarationKind.FIELD &&
- declaration.isStatic) {
- label = '${parent.name}.${declaration.name}';
} else {
return null;
}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
index 75a29be..5c1996d 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
@@ -473,9 +473,7 @@
// the DAS implementation.
bool shouldIncludeChild(Declaration child) =>
child.kind == DeclarationKind.CONSTRUCTOR ||
- child.kind == DeclarationKind.ENUM_CONSTANT ||
- (child.kind == DeclarationKind.GETTER && child.isStatic) ||
- (child.kind == DeclarationKind.FIELD && child.isStatic);
+ child.kind == DeclarationKind.ENUM_CONSTANT;
performance.run('addIncludedSuggestionSets', (performance) {
// Checked in `if` above.
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index 4fbeca3..33bc64a 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -220,10 +220,8 @@
kinds.add(protocol.ElementKind.CONSTRUCTOR);
kinds.add(protocol.ElementKind.ENUM_CONSTANT);
kinds.add(protocol.ElementKind.EXTENSION);
- // Static fields.
- kinds.add(protocol.ElementKind.FIELD);
kinds.add(protocol.ElementKind.FUNCTION);
- // Static and top-level properties.
+ // Top-level properties.
kinds.add(protocol.ElementKind.GETTER);
kinds.add(protocol.ElementKind.SETTER);
kinds.add(protocol.ElementKind.TOP_LEVEL_VARIABLE);
diff --git a/pkg/analysis_server/test/client/completion_driver_test.dart b/pkg/analysis_server/test/client/completion_driver_test.dart
index 1d0f6c4..0508315 100644
--- a/pkg/analysis_server/test/client/completion_driver_test.dart
+++ b/pkg/analysis_server/test/client/completion_driver_test.dart
@@ -279,20 +279,6 @@
with CompletionWithSuggestionsTestCases {
@override
TestingCompletionProtocol get protocol => TestingCompletionProtocol.version2;
-
- @FailingTest(reason: 'Not implemented yet')
- @override
- Future<void> test_project_lib_fields_static() {
- // TODO: implement test_project_lib_fields_static
- return super.test_project_lib_fields_static();
- }
-
- @FailingTest(reason: 'Not implemented yet')
- @override
- Future<void> test_project_lib_getters_static() {
- // TODO: implement test_project_lib_getters_static
- return super.test_project_lib_getters_static();
- }
}
mixin CompletionWithSuggestionsTestCases on AbstractCompletionDriverTest {
@@ -487,29 +473,6 @@
assertNoSuggestion(completion: 'f');
}
- Future<void> test_project_lib_fields_static() async {
- newFile('$testPackageLibPath/a.dart', r'''
-class A {
- static int f = 0;
-}
-''');
-
- if (isProtocolVersion1) {
- await waitForSetWithUri('package:test/a.dart');
- }
-
- await addTestFile('''
-void f() {
- ^
-}
-''');
-
- assertSuggestion(
- completion: 'A.f',
- element: ElementKind.FIELD,
- );
- }
-
Future<void> test_project_lib_getters_class() async {
newFile('$testPackageLibPath/a.dart', r'''
class A {
@@ -530,29 +493,6 @@
assertNoSuggestion(completion: 'g');
}
- Future<void> test_project_lib_getters_static() async {
- newFile('$testPackageLibPath/a.dart', r'''
-class A {
- static int get g => 0;
-}
-''');
-
- if (isProtocolVersion1) {
- await waitForSetWithUri('package:test/a.dart');
- }
-
- await addTestFile('''
-void f() {
- ^
-}
-''');
-
- assertSuggestion(
- completion: 'A.g',
- element: ElementKind.GETTER,
- );
- }
-
/// See: https://github.com/dart-lang/sdk/issues/40626
Future<void> test_project_lib_getters_topLevel() async {
newFile('$testPackageLibPath/a.dart', r'''
diff --git a/pkg/analysis_server/test/lsp/completion_dart_test.dart b/pkg/analysis_server/test/lsp/completion_dart_test.dart
index 9b2f453..e7b5d87 100644
--- a/pkg/analysis_server/test/lsp/completion_dart_test.dart
+++ b/pkg/analysis_server/test/lsp/completion_dart_test.dart
@@ -2157,79 +2157,6 @@
part 'main.dart';'''));
}
- Future<void> test_unimportedSymbols_members() async {
- newFile(
- join(projectFolderPath, 'source_file.dart'),
- '''
- class MyExportedClass {
- DateTime myInstanceDateTime;
- static DateTime myStaticDateTimeField;
- static DateTime get myStaticDateTimeGetter => null;
- }
- ''',
- );
-
- final content = '''
-void f() {
- var a = MyExported^
-}
- ''';
-
- final initialAnalysis = waitForAnalysisComplete();
- await initialize(
- workspaceCapabilities:
- withApplyEditSupport(emptyWorkspaceClientCapabilities));
- await openFile(mainFileUri, withoutMarkers(content));
- await initialAnalysis;
- final res = await getCompletion(mainFileUri, positionFromMarker(content));
-
- final completions =
- res.where((c) => c.label.startsWith('MyExportedClass')).toList();
- expect(
- completions.map((c) => c.label),
- unorderedEquals([
- 'MyExportedClass',
- 'MyExportedClass()',
- // The instance field should not show up.
- 'MyExportedClass.myStaticDateTimeField',
- 'MyExportedClass.myStaticDateTimeGetter'
- ]));
-
- final completion = completions
- .singleWhere((c) => c.label == 'MyExportedClass.myStaticDateTimeField');
-
- // Resolve the completion item (via server) to get its edits. This is the
- // LSP's equiv of getSuggestionDetails() and is invoked by LSP clients to
- // populate additional info (in our case, the additional edits for inserting
- // the import).
- final resolved = await resolveCompletion(completion);
- expect(resolved, isNotNull);
-
- // Ensure the detail field was update to show this will auto-import.
- expect(
- resolved.detail, startsWith("Auto import from '../source_file.dart'"));
-
- // Ensure the edit was added on.
- expect(resolved.textEdit, isNotNull);
-
- // Apply both the main completion edit and the additionalTextEdits atomically.
- final newContent = applyTextEdits(
- withoutMarkers(content),
- [toTextEdit(resolved.textEdit!)]
- .followedBy(resolved.additionalTextEdits!)
- .toList(),
- );
-
- // Ensure both edits were made - the completion, and the inserted import.
- expect(newContent, equals('''
-import '../source_file.dart';
-
-void f() {
- var a = MyExportedClass.myStaticDateTimeField
-}
- '''));
- }
-
/// This test reproduces a bug where the pathKey hash used in
/// available_declarations.dart would not change with the contents of the file
/// (as it always used 0 as the modification stamp) which would prevent
diff --git a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
index 4dd9882..b9f479a 100644
--- a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
@@ -204,7 +204,6 @@
ElementKind.ENUM,
ElementKind.ENUM_CONSTANT,
ElementKind.EXTENSION,
- ElementKind.FIELD,
ElementKind.FUNCTION,
ElementKind.FUNCTION_TYPE_ALIAS,
ElementKind.GETTER,
diff --git a/runtime/tests/concurrency/stress_test_list.json b/runtime/tests/concurrency/stress_test_list.json
index 843350b..9761651 100644
--- a/runtime/tests/concurrency/stress_test_list.json
+++ b/runtime/tests/concurrency/stress_test_list.json
@@ -3328,7 +3328,6 @@
"../../../tests/standalone/io/process_segfault_test.dart",
"../../../tests/standalone/io/process_start_exception_test.dart",
"../../../tests/standalone/io/raw_datagram_read_all_test.dart",
- "../../../tests/standalone/io/raw_datagram_socket_test.dart",
"../../../tests/standalone/io/raw_datagram_zero_length_test.dart",
"../../../tests/standalone/io/raw_server_socket_cancel_test.dart",
"../../../tests/standalone/io/raw_socket_typed_data_test.dart",
@@ -6652,7 +6651,6 @@
"../../../tests/standalone_2/io/process_segfault_test.dart",
"../../../tests/standalone_2/io/process_start_exception_test.dart",
"../../../tests/standalone_2/io/raw_datagram_read_all_test.dart",
- "../../../tests/standalone_2/io/raw_datagram_socket_test.dart",
"../../../tests/standalone_2/io/raw_datagram_zero_length_test.dart",
"../../../tests/standalone_2/io/raw_server_socket_cancel_test.dart",
"../../../tests/standalone_2/io/raw_socket_typed_data_test.dart",
diff --git a/tools/VERSION b/tools/VERSION
index bb151a6..97aecf2 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 18
PATCH 0
-PRERELEASE 84
+PRERELEASE 85
PRERELEASE_PATCH 0
\ No newline at end of file