Change file paths to URIs to fix "Could not run configuration in engine" on Windows (#22507)
* Change file paths to URIs to fix "Could not run configuration in engine" on Windows
Plus unskip test that was failing due to this.
Fixes #21348.
* Remove unused import
diff --git a/packages/flutter_tools/lib/src/vmservice.dart b/packages/flutter_tools/lib/src/vmservice.dart
index ae7652e..0fa50cb 100644
--- a/packages/flutter_tools/lib/src/vmservice.dart
+++ b/packages/flutter_tools/lib/src/vmservice.dart
@@ -921,13 +921,12 @@
Uri main,
Uri packages,
Uri assetsDirectory) {
- // TODO(goderbauer): Transfer Uri (instead of file path) when remote end supports it.
return invokeRpc<ServiceMap>('_flutter.runInView',
params: <String, dynamic> {
'viewId': viewId,
- 'mainScript': main.toFilePath(windows: false),
- 'packagesFile': packages.toFilePath(windows: false),
- 'assetDirectory': assetsDirectory.toFilePath(windows: false)
+ 'mainScript': main.toString(),
+ 'packagesFile': packages.toString(),
+ 'assetDirectory': assetsDirectory.toString()
});
}
diff --git a/packages/flutter_tools/test/integration/hot_reload_test.dart b/packages/flutter_tools/test/integration/hot_reload_test.dart
index 2393ac7..a2b4f12 100644
--- a/packages/flutter_tools/test/integration/hot_reload_test.dart
+++ b/packages/flutter_tools/test/integration/hot_reload_test.dart
@@ -4,8 +4,6 @@
import 'package:file/file.dart';
import 'package:flutter_tools/src/base/file_system.dart';
-import 'package:flutter_tools/src/base/platform.dart';
-
import 'package:vm_service_client/vm_service_client.dart';
import '../src/common.dart';
@@ -37,9 +35,7 @@
test('restart works without error', () async {
await _flutter.run();
await _flutter.hotRestart();
- // TODO(dantup): Unskip after flutter-tester restart issue is fixed on Windows:
- // https://github.com/flutter/flutter/issues/21348.
- }, skip: platform.isWindows);
+ });
test('reload hits breakpoints with file:// prefixes after reload', () async {
await _flutter.run(withDebugger: true);