Skip to content

Commit 51d46fd

Browse files
DanTupCommit Queue
authored andcommitted
Update watcher and remove related failingTest() annotation
This updates the watcher package to include a fix for the `ready` Future not completing for non-existent folders on Windows: dart-archive/watcher#157 This fixes a bug where the analyzer would wait indefinitely during initialisation if the workspace contained a folder that did not existing on disk (such as if you have a .code-workspace containing folders and one was subsequently deleted). Fixes #54116 Change-Id: If283403681080477e497fe7e17f2faa217a5a643 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339401 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 1c1bcf7 commit 51d46fd

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ vars = {
189189
"typed_data_rev": "0b16bd26c90bc9ac08e8b4b259aa3d7bead34feb",
190190
"usage_rev": "e99690ae6d5fa9ec24ac5218bcd3621e8e3ae8a9",
191191
"vector_math_rev": "cca3cf191628bce5354a5989ae61261837ceabfc",
192-
"watcher_rev": "6ac67f18d7f3a0eea728c45ea16993bdfb91ea42",
192+
"watcher_rev": "dc45f1925f66743ff29b9dcbb4693a7ec25945c5",
193193
"web_rev": "cffc2e3d80591c3ddf536f27a7f2fce49ff45e7d",
194194
"web_socket_channel_rev": "5241175e7c66271850d6e75fb9ec90068f9dd3c4", # https://github.com/dart-lang/sdk/issues/54165
195195
"webdev_rev": "63e09e5060813a971ec0f95472613d6958f75b95",

pkg/analysis_server/test/integration/lsp_server/diagnostic_test.dart

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
import 'dart:io';
6-
75
import 'package:analyzer/src/test_utilities/test_code_format.dart';
86
import 'package:test/test.dart';
97
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -85,21 +83,7 @@ linter:
8583

8684
/// Ensure we get diagnostics for a project even if the workspace contains
8785
/// another folder that does not exist.
88-
@FailingTest(issue: 'https://github.com/dart-lang/sdk/issues/54116')
8986
Future<void> test_workspaceFolders_existsAndDoesNotExist() async {
90-
if (!Platform.isWindows) {
91-
// IF THIS TEST STARTS FAILING...
92-
//
93-
// This test is (at the time of writing) expected to fail on Windows. It
94-
// passes on other platforms so we explicitly fail here for consistency.
95-
//
96-
// If the Windows bot start failing (because the issue is fixed and the
97-
// test is now passing on Windows), this conditional code block should be
98-
// removed, along with the .timeout() further down.
99-
fail('Forced failure for non-Windows so we can detect when the Windows '
100-
'issue is fixed');
101-
}
102-
10387
final rootPath = projectFolderUri.toFilePath();
10488
final existingFolderUri = Uri.file(pathContext.join(rootPath, 'exists'));
10589
final existingFileUri =
@@ -115,11 +99,7 @@ linter:
11599
await initialize(
116100
workspaceFolders: [existingFolderUri, nonExistingFolderUri]);
117101

118-
// The .timeout() is to ensure this test fails in a way that @FailingTest
119-
// supports and does not just time out. This timeout should be removed
120-
// when the test is passing.
121-
final diagnostics =
122-
await diagnosticsFuture.timeout(const Duration(seconds: 10));
102+
final diagnostics = await diagnosticsFuture;
123103
expect(diagnostics, hasLength(1));
124104
expect(diagnostics!.single.code, 'undefined_class');
125105
}

0 commit comments

Comments
 (0)