Skip to content

Commit

Permalink
Make compiler optional in calls to currentPlatform (#2117)
Browse files Browse the repository at this point in the history
Allow backwards compatibility with current callers. This might make it
easier to land flutter/engine#46592
  • Loading branch information
natebosch authored Oct 13, 2023
1 parent 4341470 commit ae7f30e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 3 additions & 1 deletion pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 1.24.8-wip
## 1.24.8

* Support version `0.5.8` of `package:test_core`.

## 1.24.7

Expand Down
4 changes: 2 additions & 2 deletions pkgs/test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions pkgs/test_core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion pkgs/test_core/lib/src/util/io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ 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) =>
// TODO: https://github.com/dart-lang/test/issues/2119 - require compiler
SuitePlatform currentPlatform(Runtime runtime, [Compiler? compiler]) =>
SuitePlatform(runtime,
compiler: compiler,
os: runtime.isBrowser ? OperatingSystem.none : currentOS,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/test_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit ae7f30e

Please sign in to comment.