Skip to content

Commit 06f9f2f

Browse files
authored
Bump min SDK to 2.4.0 for bug in for-loop elements (#1147)
Closes #1141 Bump min SDK in all packages for safety. Restore use of for-loop elements in a top level variable since they work in this SDK.
1 parent 7fdb196 commit 06f9f2f

File tree

11 files changed

+30
-18
lines changed

11 files changed

+30
-18
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ after_failure:
1313
jobs:
1414
include:
1515
- stage: analyze_and_format
16-
name: "SDK: 2.3.0; PKGS: pkgs/test, pkgs/test_api, pkgs/test_core; TASKS: `dartanalyzer --fatal-warnings .`"
17-
dart: "2.3.0"
16+
name: "SDK: 2.4.0; PKGS: pkgs/test, pkgs/test_api, pkgs/test_core; TASKS: `dartanalyzer --fatal-warnings .`"
17+
dart: "2.4.0"
1818
os: linux
1919
env: PKGS="pkgs/test pkgs/test_api pkgs/test_core"
2020
script: ./tool/travis.sh dartanalyzer_1

pkgs/test/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.11.2-dev
2+
3+
* Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
4+
15
## 1.11.1
26

37
* Allow `test_api` `0.2.13` to work around a bug in the SDK version `2.3.0`.

pkgs/test/mono_pkg.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ stages:
99
dart: dev
1010
- group:
1111
- dartanalyzer: --fatal-warnings .
12-
dart: 2.3.0
12+
dart: 2.4.0
1313
- unit_test:
1414
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 0
1515
- command: xvfb-run -s "-screen 0 1024x768x24" pub run test --preset travis --total-shards 5 --shard-index 1

pkgs/test/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: test
2-
version: 1.11.1
2+
version: 1.11.2-dev
33
description: A full featured library for writing and running Dart tests.
44
homepage: https://github.com/dart-lang/test/blob/master/pkgs/test
55

66
environment:
7-
sdk: '>=2.3.0 <3.0.0'
7+
sdk: '>=2.4.0 <3.0.0'
88

99
dependencies:
1010
analyzer: ">=0.36.0 <0.40.0"
@@ -30,8 +30,8 @@ dependencies:
3030
web_socket_channel: ^1.0.0
3131
yaml: ^2.0.0
3232
# Use an exact version until the test_api and test_core package are stable.
33-
test_api: 0.2.13
34-
test_core: 0.2.18
33+
test_api: 0.2.14
34+
test_core: 0.2.19
3535

3636
dev_dependencies:
3737
fake_async: ^1.0.0

pkgs/test_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.14
2+
3+
* Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
4+
15
## 0.2.13
26

37
* Work around a bug in the `2.3.0` SDK by avoiding for-loop elements at the top

pkgs/test_api/lib/src/backend/platform_selector.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ final _universalValidVariables = {
1616
'browser',
1717
'js',
1818
'blink',
19-
'google'
20-
}
21-
..addAll(Runtime.builtIn.map((r) => r.identifier))
22-
..addAll(OperatingSystem.all.map((os) => os.identifier));
19+
'google',
20+
for (var runtime in Runtime.builtIn) runtime.identifier,
21+
for (var os in OperatingSystem.all) os.identifier,
22+
};
2323

2424
/// An expression for selecting certain platforms, including operating systems
2525
/// and browsers.

pkgs/test_api/mono_pkg.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stages:
66
dart: dev
77
- group:
88
- dartanalyzer: --fatal-warnings .
9-
dart: 2.3.0
9+
dart: 2.4.0
1010
- unit_test:
1111
- group:
1212
- test: --preset travis

pkgs/test_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: test_api
2-
version: 0.2.13
2+
version: 0.2.14-dev
33
description: A library for writing Dart tests.
44
homepage: https://github.com/dart-lang/test/blob/master/pkgs/test_api
55

66
environment:
7-
sdk: ">=2.3.0 <3.0.0"
7+
sdk: ">=2.4.0 <3.0.0"
88

99
dependencies:
1010
async: ^2.0.0

pkgs/test_core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.19-dev
2+
3+
* Bump minimum SDK to `2.4.0` for safer usage of for-loop elements.
4+
15
## 0.2.18
26

37
* Allow `test_api` `0.2.13` to work around a bug in the SDK version `2.3.0`.

pkgs/test_core/mono_pkg.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ stages:
66
dart: dev
77
- group:
88
- dartanalyzer: --fatal-warnings .
9-
dart: 2.3.0
9+
dart: 2.4.0

0 commit comments

Comments
 (0)