From fe99dc7779f9f25f3cf83b6b90df7339aa90b69f Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Oct 2023 01:39:18 +0000 Subject: [PATCH 1/3] Make compiler optional in calls to currentPlatform Allow backwards compatibility with current callers. This might make it easier to land https://github.com/flutter/engine/pull/46592 --- pkgs/test_core/CHANGELOG.md | 4 ++++ pkgs/test_core/lib/src/util/io.dart | 2 +- pkgs/test_core/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_core/CHANGELOG.md b/pkgs/test_core/CHANGELOG.md index 695e94e68..e73df1cfc 100644 --- a/pkgs/test_core/CHANGELOG.md +++ b/pkgs/test_core/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.8 + +* Allow omitting the `Compiler` argument to `currentPlatform`. + ## 0.5.7 * Pass --disable-program-split to dart2js to fix tests which use deferred diff --git a/pkgs/test_core/lib/src/util/io.dart b/pkgs/test_core/lib/src/util/io.dart index 59e613c6a..2de6ef37c 100644 --- a/pkgs/test_core/lib/src/util/io.dart +++ b/pkgs/test_core/lib/src/util/io.dart @@ -48,7 +48,7 @@ final currentOS = OperatingSystem.findByIoName(Platform.operatingSystem); /// [inGoogle] determined automatically. /// /// If [runtime] is a browser, this will set [os] to [OperatingSystem.none]. -SuitePlatform currentPlatform(Runtime runtime, Compiler? compiler) => +SuitePlatform currentPlatform(Runtime runtime, [Compiler? compiler]) => SuitePlatform(runtime, compiler: compiler, os: runtime.isBrowser ? OperatingSystem.none : currentOS, diff --git a/pkgs/test_core/pubspec.yaml b/pkgs/test_core/pubspec.yaml index 70a250951..42aeb38ca 100644 --- a/pkgs/test_core/pubspec.yaml +++ b/pkgs/test_core/pubspec.yaml @@ -1,5 +1,5 @@ name: test_core -version: 0.5.7 +version: 0.5.8 description: A basic library for writing tests and running them on the VM. repository: https://github.com/dart-lang/test/tree/master/pkgs/test_core From d2039d0ca2582a27132585a8b1c0db2865311fb1 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Oct 2023 16:54:49 +0000 Subject: [PATCH 2/3] Use latest test_core --- pkgs/test/CHANGELOG.md | 4 +++- pkgs/test/pubspec.yaml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/test/CHANGELOG.md b/pkgs/test/CHANGELOG.md index d627eb8f2..1d7bf194c 100644 --- a/pkgs/test/CHANGELOG.md +++ b/pkgs/test/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.24.8-wip +## 1.24.8 + +* Support version `0.5.8` of `package:test_core`. ## 1.24.7 diff --git a/pkgs/test/pubspec.yaml b/pkgs/test/pubspec.yaml index 4a5661a39..7fd0525f2 100644 --- a/pkgs/test/pubspec.yaml +++ b/pkgs/test/pubspec.yaml @@ -1,5 +1,5 @@ name: test -version: 1.24.8-wip +version: 1.24.8 description: >- A full featured library for writing and running Dart tests across platforms. repository: https://github.com/dart-lang/test/tree/master/pkgs/test @@ -35,7 +35,7 @@ dependencies: # Use an exact version until the test_api and test_core package are stable. test_api: 0.6.1 - test_core: 0.5.7 + test_core: 0.5.8 typed_data: ^1.3.0 web_socket_channel: ^2.0.0 From 5f648b4dd47e700815ef0df13814716406378bf4 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Oct 2023 17:20:04 +0000 Subject: [PATCH 3/3] Add TODO --- pkgs/test_core/lib/src/util/io.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/test_core/lib/src/util/io.dart b/pkgs/test_core/lib/src/util/io.dart index 2de6ef37c..922843791 100644 --- a/pkgs/test_core/lib/src/util/io.dart +++ b/pkgs/test_core/lib/src/util/io.dart @@ -48,6 +48,7 @@ final currentOS = OperatingSystem.findByIoName(Platform.operatingSystem); /// [inGoogle] determined automatically. /// /// If [runtime] is a browser, this will set [os] to [OperatingSystem.none]. +// TODO: https://github.com/dart-lang/test/issues/2119 - require compiler SuitePlatform currentPlatform(Runtime runtime, [Compiler? compiler]) => SuitePlatform(runtime, compiler: compiler,