Unpin DDS and roll pub packages (#147925)
DDS was temporarily pinned to 4.1.0 because 4.2.0 triggered some test failures (see https://github.com/flutter/flutter/pull/147250). Those failures should be fixed by vm_service 14.2.2, so this unpins DDS and rolls both of these packages (along with devtools_shared, which is a DDS dependency). (If the bot updates vm_service before this is done, I can rebase over that will reduce the size of this PR to just a few files)
This commit is contained in:
@@ -385,14 +385,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter with VmServiceInfoFile
|
||||
// debugger we send this ourselves, to allow clients to connect to the
|
||||
// VM Service for things like starting DevTools, even if debugging is
|
||||
// not available.
|
||||
// TODO(dantup): Switch this to call `sendDebuggerUris()` on the base
|
||||
// adapter once rolled into Flutter.
|
||||
sendEvent(
|
||||
RawEventBody(<String, Object?>{
|
||||
'vmServiceUri': vmServiceUri.toString(),
|
||||
}),
|
||||
eventType: 'dart.debuggerUris',
|
||||
);
|
||||
sendDebuggerUris(vmServiceUri);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ const Map<String, String> kManuallyPinnedDependencies = <String, String>{
|
||||
'path_provider_android':
|
||||
'2.2.1', // https://github.com/flutter/flutter/issues/140796
|
||||
'camera_android': '0.10.8+17', // https://github.com/flutter/flutter/issues/146004
|
||||
'dds': '4.1.0', // https://github.com/dart-lang/sdk/issues/55559
|
||||
};
|
||||
|
||||
/// These are packages that are explicitly excluded from appearing in the list
|
||||
|
||||
@@ -13,7 +13,7 @@ dependencies:
|
||||
archive: 3.3.2
|
||||
args: 2.5.0
|
||||
browser_launcher: 1.1.1
|
||||
dds: 4.1.0
|
||||
dds: 4.2.1
|
||||
dwds: 24.0.0
|
||||
completion: 1.0.1
|
||||
coverage: 1.8.0
|
||||
@@ -65,7 +65,7 @@ dependencies:
|
||||
test_api: 0.7.1
|
||||
test_core: 0.6.2
|
||||
|
||||
vm_service: 14.2.1
|
||||
vm_service: 14.2.2
|
||||
|
||||
standard_message_codec: 0.0.1+4
|
||||
|
||||
@@ -78,7 +78,7 @@ dependencies:
|
||||
csslib: 1.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
dap: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
dds_service_extensions: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
devtools_shared: 9.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
devtools_shared: 10.0.0-dev.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
dtd: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
extension_discovery: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
fixnum: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
@@ -121,4 +121,4 @@ dartdoc:
|
||||
# Exclude this package from the hosted API docs.
|
||||
nodoc: true
|
||||
|
||||
# PUBSPEC CHECKSUM: 931d
|
||||
# PUBSPEC CHECKSUM: ac14
|
||||
|
||||
@@ -166,102 +166,69 @@ void main() {
|
||||
});
|
||||
|
||||
testWithoutContext('setAssetDirectory forwards arguments correctly', () async {
|
||||
final Completer<String> completer = Completer<String>();
|
||||
final vm_service.VmService vmService = vm_service.VmService(
|
||||
const Stream<String>.empty(),
|
||||
completer.complete,
|
||||
);
|
||||
final FlutterVmService flutterVmService = FlutterVmService(vmService);
|
||||
final MockVMService mockVMService = MockVMService();
|
||||
final FlutterVmService flutterVmService = FlutterVmService(mockVMService);
|
||||
|
||||
unawaited(flutterVmService.setAssetDirectory(
|
||||
await flutterVmService.setAssetDirectory(
|
||||
assetsDirectory: Uri(path: 'abc', scheme: 'file'),
|
||||
viewId: 'abc',
|
||||
uiIsolateId: 'def',
|
||||
windows: false,
|
||||
));
|
||||
);
|
||||
|
||||
final Map<String, Object?>? rawRequest = json.decode(await completer.future) as Map<String, Object?>?;
|
||||
|
||||
expect(rawRequest, allOf(<Matcher>[
|
||||
containsPair('method', kSetAssetBundlePathMethod),
|
||||
containsPair('params', allOf(<Matcher>[
|
||||
containsPair('viewId', 'abc'),
|
||||
containsPair('assetDirectory', '/abc'),
|
||||
containsPair('isolateId', 'def'),
|
||||
])),
|
||||
]));
|
||||
final ({Map<String, Object?>? args, String? isolateId}) call = mockVMService.calledMethods[kSetAssetBundlePathMethod]!.single;
|
||||
expect(call.isolateId, 'def');
|
||||
expect(call.args, <String, String>{
|
||||
'viewId': 'abc',
|
||||
'assetDirectory': '/abc',
|
||||
});
|
||||
});
|
||||
|
||||
testWithoutContext('setAssetDirectory forwards arguments correctly - windows', () async {
|
||||
final Completer<String> completer = Completer<String>();
|
||||
final vm_service.VmService vmService = vm_service.VmService(
|
||||
const Stream<String>.empty(),
|
||||
completer.complete,
|
||||
);
|
||||
final FlutterVmService flutterVmService = FlutterVmService(vmService);
|
||||
unawaited(flutterVmService.setAssetDirectory(
|
||||
final MockVMService mockVMService = MockVMService();
|
||||
final FlutterVmService flutterVmService = FlutterVmService(mockVMService);
|
||||
|
||||
await flutterVmService.setAssetDirectory(
|
||||
assetsDirectory: Uri(path: 'C:/Users/Tester/AppData/Local/Temp/hello_worldb42a6da5/hello_world/build/flutter_assets', scheme: 'file'),
|
||||
viewId: 'abc',
|
||||
uiIsolateId: 'def',
|
||||
// If windows is not set to `true`, then the file path below is incorrectly prepended with a `/` which
|
||||
// causes the engine asset manager to interpret the file scheme as invalid.
|
||||
windows: true,
|
||||
));
|
||||
);
|
||||
|
||||
final Map<String, Object?>? rawRequest = json.decode(await completer.future) as Map<String, Object?>?;
|
||||
|
||||
expect(rawRequest, allOf(<Matcher>[
|
||||
containsPair('method', kSetAssetBundlePathMethod),
|
||||
containsPair('params', allOf(<Matcher>[
|
||||
containsPair('viewId', 'abc'),
|
||||
containsPair('assetDirectory', r'C:\Users\Tester\AppData\Local\Temp\hello_worldb42a6da5\hello_world\build\flutter_assets'),
|
||||
containsPair('isolateId', 'def'),
|
||||
])),
|
||||
]));
|
||||
final ({Map<String, Object?>? args, String? isolateId}) call = mockVMService.calledMethods[kSetAssetBundlePathMethod]!.single;
|
||||
expect(call.isolateId, 'def');
|
||||
expect(call.args, <String, String>{
|
||||
'viewId': 'abc',
|
||||
'assetDirectory': r'C:\Users\Tester\AppData\Local\Temp\hello_worldb42a6da5\hello_world\build\flutter_assets',
|
||||
});
|
||||
});
|
||||
|
||||
testWithoutContext('getSkSLs forwards arguments correctly', () async {
|
||||
final Completer<String> completer = Completer<String>();
|
||||
final vm_service.VmService vmService = vm_service.VmService(
|
||||
const Stream<String>.empty(),
|
||||
completer.complete,
|
||||
);
|
||||
final FlutterVmService flutterVmService = FlutterVmService(vmService);
|
||||
final MockVMService mockVMService = MockVMService();
|
||||
final FlutterVmService flutterVmService = FlutterVmService(mockVMService);
|
||||
|
||||
unawaited(flutterVmService.getSkSLs(
|
||||
viewId: 'abc',
|
||||
));
|
||||
await flutterVmService.getSkSLs(viewId: 'abc');
|
||||
|
||||
final Map<String, Object?>? rawRequest = json.decode(await completer.future) as Map<String, Object?>?;
|
||||
|
||||
expect(rawRequest, allOf(<Matcher>[
|
||||
containsPair('method', kGetSkSLsMethod),
|
||||
containsPair('params', allOf(<Matcher>[
|
||||
containsPair('viewId', 'abc'),
|
||||
])),
|
||||
]));
|
||||
final ({Map<String, Object?>? args, String? isolateId}) call = mockVMService.calledMethods[kGetSkSLsMethod]!.single;
|
||||
expect(call.isolateId, isNull);
|
||||
expect(call.args, <String, String>{
|
||||
'viewId': 'abc',
|
||||
});
|
||||
});
|
||||
|
||||
testWithoutContext('flushUIThreadTasks forwards arguments correctly', () async {
|
||||
final Completer<String> completer = Completer<String>();
|
||||
final vm_service.VmService vmService = vm_service.VmService(
|
||||
const Stream<String>.empty(),
|
||||
completer.complete,
|
||||
);
|
||||
final FlutterVmService flutterVmService = FlutterVmService(vmService);
|
||||
final MockVMService mockVMService = MockVMService();
|
||||
final FlutterVmService flutterVmService = FlutterVmService(mockVMService);
|
||||
|
||||
unawaited(flutterVmService.flushUIThreadTasks(
|
||||
uiIsolateId: 'def',
|
||||
));
|
||||
await flutterVmService.flushUIThreadTasks(uiIsolateId: 'def');
|
||||
|
||||
final Map<String, Object?>? rawRequest = json.decode(await completer.future) as Map<String, Object?>?;
|
||||
|
||||
expect(rawRequest, allOf(<Matcher>[
|
||||
containsPair('method', kFlushUIThreadTasksMethod),
|
||||
containsPair('params', allOf(<Matcher>[
|
||||
containsPair('isolateId', 'def'),
|
||||
])),
|
||||
]));
|
||||
final ({Map<String, Object?>? args, String? isolateId}) call = mockVMService.calledMethods[kFlushUIThreadTasksMethod]!.single;
|
||||
expect(call.isolateId, isNull);
|
||||
expect(call.args, <String, String>{
|
||||
'isolateId': 'def',
|
||||
});
|
||||
});
|
||||
|
||||
testWithoutContext('runInView forwards arguments correctly', () async {
|
||||
@@ -851,9 +818,18 @@ void main() {
|
||||
class MockVMService extends Fake implements vm_service.VmService {
|
||||
final Map<String, String> services = <String, String>{};
|
||||
final Map<String, vm_service.ServiceCallback> serviceCallBacks = <String, vm_service.ServiceCallback>{};
|
||||
final Map<String, List<({ String? isolateId, Map<String, Object?>? args})>> calledMethods = <String, List<({Map<String, Object?>? args, String? isolateId})>>{};
|
||||
final Set<String> listenedStreams = <String>{};
|
||||
bool errorOnRegisterService = false;
|
||||
|
||||
@override
|
||||
Future<vm_service.Response> callMethod(String method, {String? isolateId, Map<String, Object?>? args}) async {
|
||||
calledMethods
|
||||
.putIfAbsent(method, () => <({Map<String, Object?>? args, String? isolateId})>[])
|
||||
.add((isolateId: isolateId, args: args));
|
||||
return vm_service.Success();
|
||||
}
|
||||
|
||||
@override
|
||||
void registerServiceCallback(String service, vm_service.ServiceCallback cb) {
|
||||
serviceCallBacks[service] = cb;
|
||||
|
||||
@@ -464,8 +464,11 @@ The relevant error-causing widget was:
|
||||
// Launch the app and wait for it to stop at an exception.
|
||||
late int originalThreadId, newThreadId;
|
||||
await Future.wait(<Future<void>>[
|
||||
// Capture the thread ID of the stopped thread.
|
||||
dap.client.stoppedEvents.first.then((StoppedEventBody event) => originalThreadId = event.threadId!),
|
||||
// Capture the thread ID of thread when it stops on the exception
|
||||
// (ignoring the stop on entry that occurs during thread start).
|
||||
dap.client.stoppedEvents
|
||||
.where((StoppedEventBody event) => event.reason == 'exception').first
|
||||
.then((StoppedEventBody event) => originalThreadId = event.threadId!),
|
||||
dap.client.start(
|
||||
exceptionPauseMode: 'All', // Ensure we stop on all exceptions
|
||||
launch: () => dap.client.launch(
|
||||
@@ -478,8 +481,11 @@ The relevant error-causing widget was:
|
||||
// Hot restart, ensuring it completes and capturing the ID of the new thread
|
||||
// to pause.
|
||||
await Future.wait(<Future<void>>[
|
||||
// Capture the thread ID of the newly stopped thread.
|
||||
dap.client.stoppedEvents.first.then((StoppedEventBody event) => newThreadId = event.threadId!),
|
||||
// Capture the thread ID of the next stop on exception (ignoring any
|
||||
// stop on exit/entry that occurs during thread start/exit).
|
||||
dap.client.stoppedEvents
|
||||
.where((StoppedEventBody event) => event.reason == 'exception').first
|
||||
.then((StoppedEventBody event) => newThreadId = event.threadId!),
|
||||
dap.client.hotRestart(),
|
||||
], eagerError: true);
|
||||
|
||||
|
||||
@@ -67,13 +67,6 @@ class DapTestClient {
|
||||
/// Returns a stream of the string output from [OutputEventBody] events with the category 'stdout'.
|
||||
Stream<String> get stdoutOutput => outputEvents
|
||||
.where((OutputEventBody output) => output.category == 'stdout')
|
||||
// Skip empty output events. These are pointless (but harmless) events
|
||||
// that started occurring with pkg:dds 4.2.0 because of how the stack
|
||||
// trace parsing is done. This will be unnecessary once fixed in
|
||||
// DDS/DAP.
|
||||
// TODO(dantup): Remove this once we're updated to a version of DAP that
|
||||
// includes https://dart-review.googlesource.com/c/sdk/+/364340.
|
||||
.where((OutputEventBody output) => output.output.isNotEmpty)
|
||||
.map((OutputEventBody output) => output.output);
|
||||
|
||||
/// Sends a custom request to the server and waits for a response.
|
||||
|
||||
Reference in New Issue
Block a user