Skip to content

Commit 629d369

Browse files
authored
Update analyzer version and min SDK constraint and fix analysis issues (google#1428)
1 parent 02e17e5 commit 629d369

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+141
-135
lines changed

.github/workflows/dart.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Created with package:mono_repo v6.5.7
1+
# Created with package:mono_repo v6.6.1
22
name: Dart CI
33
on:
44
push:
@@ -36,27 +36,27 @@ jobs:
3636
name: Checkout repository
3737
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
3838
- name: mono_repo self validate
39-
run: dart pub global activate mono_repo 6.5.7
39+
run: dart pub global activate mono_repo 6.6.1
4040
- name: mono_repo self validate
4141
run: dart pub global run mono_repo generate --validate
4242
job_002:
43-
name: "analyzer_and_format; Dart 3.0.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dart analyze`"
43+
name: "analyzer_and_format; Dart 3.4.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dart analyze`"
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Cache Pub hosted dependencies
4747
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
4848
with:
4949
path: "~/.pub-cache/hosted"
50-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable;commands:analyze_1"
50+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable;commands:analyze_1"
5151
restore-keys: |
52-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable
53-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
52+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:_test_yaml-checked_yaml-example-json_annotation-json_serializable
53+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
5454
os:ubuntu-latest;pub-cache-hosted
5555
os:ubuntu-latest
5656
- name: Setup Dart SDK
5757
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
5858
with:
59-
sdk: "3.0.0"
59+
sdk: "3.4.0"
6060
- id: checkout
6161
name: Checkout repository
6262
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
@@ -192,23 +192,23 @@ jobs:
192192
if: "always() && steps.json_serializable_pub_upgrade.conclusion == 'success'"
193193
working-directory: json_serializable
194194
job_004:
195-
name: "unit_test; Dart 3.0.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; `dart test`"
195+
name: "unit_test; Dart 3.4.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; `dart test`"
196196
runs-on: ubuntu-latest
197197
steps:
198198
- name: Cache Pub hosted dependencies
199199
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
200200
with:
201201
path: "~/.pub-cache/hosted"
202-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:_test_yaml-checked_yaml-example-json_serializable;commands:test_0"
202+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:_test_yaml-checked_yaml-example-json_serializable;commands:test_0"
203203
restore-keys: |
204-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:_test_yaml-checked_yaml-example-json_serializable
205-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
204+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:_test_yaml-checked_yaml-example-json_serializable
205+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
206206
os:ubuntu-latest;pub-cache-hosted
207207
os:ubuntu-latest
208208
- name: Setup Dart SDK
209209
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
210210
with:
211-
sdk: "3.0.0"
211+
sdk: "3.4.0"
212212
- id: checkout
213213
name: Checkout repository
214214
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
@@ -253,23 +253,23 @@ jobs:
253253
- job_002
254254
- job_003
255255
job_005:
256-
name: "unit_test; Dart 3.0.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/annotation_version_test.dart`"
256+
name: "unit_test; Dart 3.4.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/annotation_version_test.dart`"
257257
runs-on: ubuntu-latest
258258
steps:
259259
- name: Cache Pub hosted dependencies
260260
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
261261
with:
262262
path: "~/.pub-cache/hosted"
263-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:json_serializable;commands:test_3"
263+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:json_serializable;commands:test_3"
264264
restore-keys: |
265-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:json_serializable
266-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
265+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:json_serializable
266+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
267267
os:ubuntu-latest;pub-cache-hosted
268268
os:ubuntu-latest
269269
- name: Setup Dart SDK
270270
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
271271
with:
272-
sdk: "3.0.0"
272+
sdk: "3.4.0"
273273
- id: checkout
274274
name: Checkout repository
275275
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
@@ -287,23 +287,23 @@ jobs:
287287
- job_002
288288
- job_003
289289
job_006:
290-
name: "unit_test; Dart 3.0.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
290+
name: "unit_test; Dart 3.4.0; PKG: json_serializable; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
291291
runs-on: ubuntu-latest
292292
steps:
293293
- name: Cache Pub hosted dependencies
294294
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
295295
with:
296296
path: "~/.pub-cache/hosted"
297-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:json_serializable;commands:test_1"
297+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:json_serializable;commands:test_1"
298298
restore-keys: |
299-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:json_serializable
300-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
299+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:json_serializable
300+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
301301
os:ubuntu-latest;pub-cache-hosted
302302
os:ubuntu-latest
303303
- name: Setup Dart SDK
304304
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
305305
with:
306-
sdk: "3.0.0"
306+
sdk: "3.4.0"
307307
- id: checkout
308308
name: Checkout repository
309309
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
@@ -321,23 +321,23 @@ jobs:
321321
- job_002
322322
- job_003
323323
job_007:
324-
name: "unit_test; Dart 3.0.0; PKG: json_serializable; `dart test -p chrome`"
324+
name: "unit_test; Dart 3.4.0; PKG: json_serializable; `dart test -p chrome`"
325325
runs-on: ubuntu-latest
326326
steps:
327327
- name: Cache Pub hosted dependencies
328328
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
329329
with:
330330
path: "~/.pub-cache/hosted"
331-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:json_serializable;commands:test_2"
331+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:json_serializable;commands:test_2"
332332
restore-keys: |
333-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:json_serializable
334-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
333+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:json_serializable
334+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
335335
os:ubuntu-latest;pub-cache-hosted
336336
os:ubuntu-latest
337337
- name: Setup Dart SDK
338338
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
339339
with:
340-
sdk: "3.0.0"
340+
sdk: "3.4.0"
341341
- id: checkout
342342
name: Checkout repository
343343
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
@@ -518,23 +518,23 @@ jobs:
518518
- job_002
519519
- job_003
520520
job_012:
521-
name: "ensure_build; Dart 3.0.0; PKGS: _test_yaml, checked_yaml, example; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
521+
name: "ensure_build; Dart 3.4.0; PKGS: _test_yaml, checked_yaml, example; `dart test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
522522
runs-on: ubuntu-latest
523523
steps:
524524
- name: Cache Pub hosted dependencies
525525
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
526526
with:
527527
path: "~/.pub-cache/hosted"
528-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:_test_yaml-checked_yaml-example;commands:test_1"
528+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:_test_yaml-checked_yaml-example;commands:test_1"
529529
restore-keys: |
530-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:_test_yaml-checked_yaml-example
531-
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
530+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:_test_yaml-checked_yaml-example
531+
os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0
532532
os:ubuntu-latest;pub-cache-hosted
533533
os:ubuntu-latest
534534
- name: Setup Dart SDK
535535
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
536536
with:
537-
sdk: "3.0.0"
537+
sdk: "3.4.0"
538538
- id: checkout
539539
name: Checkout repository
540540
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633

_test_yaml/pubspec.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ name: _test_yaml
22
publish_to: none
33

44
environment:
5-
sdk: ^3.0.0
5+
sdk: ^3.4.0
66

77
dev_dependencies:
88
_json_serial_shared_test:
99
path: ../shared_test
10-
build_runner: ^2.0.0
10+
build_runner: ^2.2.1
1111
build_verify: ^3.0.0
12-
checked_yaml: any
13-
dart_flutter_team_lints: ^2.0.0
14-
json_annotation: ^4.8.1
15-
json_serializable: any
12+
checked_yaml: ^2.0.4-wip
13+
dart_flutter_team_lints: ^3.0.0
14+
json_annotation: ^4.9.0
15+
json_serializable: ^6.8.0
1616
path: ^1.8.2
17-
test: ^1.6.0
17+
test: ^1.21.6
1818
yaml: ^3.0.0
1919

2020
dependency_overrides:

_test_yaml/test/ensure_build_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@TestOn('vm')
66
@Tags(['presubmit-only'])
7-
library test;
7+
library;
88

99
import 'package:build_verify/build_verify.dart';
1010
import 'package:test/test.dart';

_test_yaml/test/yaml_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
@TestOn('vm')
6-
library test;
6+
library;
77

88
import 'dart:io';
99

checked_yaml/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 2.0.4-wip
22

3-
- Require Dart 3.0
3+
- Require Dart 3.4
44

55
## 2.0.3
66

checked_yaml/pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ topics:
1313
- codegen
1414

1515
environment:
16-
sdk: ^3.0.0
16+
sdk: ^3.4.0
1717

1818
dependencies:
1919
json_annotation: ^4.3.0
2020
source_span: ^1.8.0
2121
yaml: ^3.0.0
2222

2323
dev_dependencies:
24-
build_runner: ^2.0.0
24+
build_runner: ^2.0.6
2525
build_verify: ^3.0.0
26-
dart_flutter_team_lints: ^2.0.0
26+
dart_flutter_team_lints: ^3.0.0
2727
json_serializable: ^6.0.0
28-
path: ^1.0.0
29-
test: ^1.16.0
28+
path: ^1.8.0
29+
test: ^1.17.10
3030
test_process: ^2.0.0
3131

3232
#dependency_overrides:

checked_yaml/test/ensure_build_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
@TestOn('vm')
66
@Tags(['presubmit-only'])
7-
library test;
7+
library;
88

99
import 'package:build_verify/build_verify.dart';
1010
import 'package:test/test.dart';

example/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ dependencies to your `pubspec.yaml`.
55

66
```yaml
77
dependencies:
8-
json_annotation: ^4.8.0
8+
json_annotation: ^4.9.0
99

1010
dev_dependencies:
1111
build_runner: ^2.3.3
12-
json_serializable: ^6.6.0
12+
json_serializable: ^6.8.0
1313
```
1414
1515
Annotate your code with classes defined in

example/pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: example
22
publish_to: none
33

44
environment:
5-
sdk: ^3.0.0
5+
sdk: ^3.4.0
66

77
dependencies:
8-
json_annotation: ^4.8.0
8+
json_annotation: ^4.9.0
99

1010
dev_dependencies:
1111
# Used by tests. Not required to use `json_serializable`.
@@ -19,14 +19,14 @@ dev_dependencies:
1919
build_verify: ^3.0.0
2020

2121
# Not required to use `json_serializable`.
22-
dart_flutter_team_lints: ^2.0.0
22+
dart_flutter_team_lints: ^3.0.0
2323

2424
# REQUIRED!
25-
json_serializable: ^6.6.0
25+
json_serializable: ^6.8.0
2626

2727
# Not required to use `json_serializable`.
2828
path: ^1.8.0
29-
test: ^1.16.0
29+
test: ^1.21.6
3030

3131
# This section is used to verify changes to these packages. Do not include in
3232
# your code!

example/test/ensure_build_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
@Tags(['presubmit-only'])
6-
library test;
6+
library;
77

88
import 'package:build_verify/build_verify.dart';
99
import 'package:test/test.dart';

example/test/readme_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ void _expect(String fileName) {
2525

2626
const _pubspecContent = r'''
2727
dependencies:
28-
json_annotation: ^4.8.0
28+
json_annotation: ^4.9.0
2929
3030
dev_dependencies:
3131
build_runner: ^2.3.3
32-
json_serializable: ^6.6.0
32+
json_serializable: ^6.8.0
3333
''';

json_annotation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.9.1-wip
2+
3+
- Require Dart 3.4
4+
15
## 4.9.0
26

37
- Require Dart 3.0

json_annotation/lib/json_annotation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// Also contains helper functions and classes – prefixed with `$` used by
99
/// `json_serializable` when the `use_wrappers` or `checked` options are
1010
/// enabled.
11-
library json_annotation;
11+
library;
1212

1313
export 'src/allowed_keys_helpers.dart';
1414
export 'src/checked_helpers.dart';

json_annotation/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: json_annotation
2-
version: 4.9.0
2+
version: 4.9.1-wip
33
description: >-
44
Classes and helper functions that support JSON code generation via the
55
`json_serializable` package.
@@ -11,13 +11,13 @@ topics:
1111
- codegen
1212

1313
environment:
14-
sdk: ^3.0.0
14+
sdk: ^3.4.0
1515

1616
dependencies:
1717
meta: ^1.4.0
1818

1919
dev_dependencies:
20-
dart_flutter_team_lints: ^2.0.0
20+
dart_flutter_team_lints: ^3.0.0
2121
# When changing JsonSerializable class.
2222
# build_runner: ^2.0.0
2323
# json_serializable: any

json_serializable/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.8.1-wip
2+
3+
- Require Dart 3.4
4+
15
## 6.8.0
26

37
- Add type arguments to `Map` literals used for `Record` serialization.

json_serializable/lib/builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// This library is **not** intended to be imported by typical end-users unless
1111
/// you are creating a custom compilation pipeline. See documentation for
1212
/// details, and `build.yaml` for how these builders are configured by default.
13-
library json_serializable.builder;
13+
library;
1414

1515
import 'package:build/build.dart';
1616
import 'package:json_annotation/json_annotation.dart';

0 commit comments

Comments
 (0)