Skip to content

Commit 803cd06

Browse files
authored
chore(cli): Upgrade to analyzer model v2 (#323)
- Updates all V1 element references to their V2 counterparts - Updates checked-in Flutter version to 3.29.3
1 parent ce9f0cb commit 803cd06

File tree

68 files changed

+1428
-1350
lines changed

Some content is hidden

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

68 files changed

+1428
-1350
lines changed

.github/workflows/celest_cli.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ jobs:
4040
cache: true
4141
# Because many golden tests encode the precise Dart/Flutter SDKs used to generate
4242
# them, these values must be consistently used when running tests locally and in CI.
43-
flutter-version: 3.29.2
43+
flutter-version: 3.29.3
4444
- name: Setup Libsecret
4545
if: runner.os == 'Linux'
4646
run: tool/setup-ci.sh
4747
- name: Get Packages
4848
working-directory: apps/cli
49-
run: dart pub upgrade --verbose
49+
run: dart pub upgrade
5050
- name: Test
5151
working-directory: apps/cli
5252
run: dart test -x e2e --fail-fast -j 1

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,17 @@
2222
"request": "launch",
2323
"type": "dart"
2424
},
25+
{
26+
"name": "CLI / E2E (--update-goldens)",
27+
"request": "launch",
28+
"type": "dart",
29+
"cwd": "apps/cli",
30+
"program": "fixtures/fixtures_test.dart",
31+
"env": {
32+
"UPDATE_GOLDENS": "true",
33+
"INCLUDE_TESTS": "marcelo"
34+
},
35+
"args": ["--timeout=none"]
36+
},
2537
]
2638
}

apps/cli/fixtures/fixtures_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ class TestRunner {
148148
exe: Platform.resolvedExecutable,
149149
action: PubAction.upgrade,
150150
workingDirectory: projectRoot,
151-
).timeout(const Duration(seconds: 10));
151+
verbose: Platform.environment.containsKey('CI'),
152+
).timeout(const Duration(seconds: 30));
152153
if (updateGoldens) {
153154
if (goldensDir.existsSync()) {
154155
goldensDir.deleteSync(recursive: true);

apps/cli/fixtures/standalone/api/client/lib/src/functions.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5125,7 +5125,7 @@ class CelestFunctionsMetadata {
51255125
return;
51265126
}
51275127

5128-
@Deprecated('Do not use this function.')
5128+
@Deprecated.new('Do not use this function.')
51295129
@_$celest.CloudFunction(
51305130
api: 'metadata',
51315131
function: 'hasConstructedDeprecatedAnnotation',
@@ -5174,7 +5174,7 @@ class CelestFunctionsMetadata {
51745174
return;
51755175
}
51765176

5177-
@Literals(
5177+
@Literals.new(
51785178
string: 'string',
51795179
intValue: 1,
51805180
doubleValue: 1.0,
@@ -5189,7 +5189,7 @@ class CelestFunctionsMetadata {
51895189
function: 'hasLiteralsAnnotation',
51905190
)
51915191
Future<void> hasLiteralsAnnotation(
5192-
@Literals(
5192+
@Literals.new(
51935193
string: 'string',
51945194
intValue: 1,
51955195
doubleValue: 1.0,
@@ -5200,7 +5200,7 @@ class CelestFunctionsMetadata {
52005200
recordValue: const (a: 'a', b: 'b', c: 'c'),
52015201
)
52025202
String value, {
5203-
@Literals(
5203+
@Literals.new(
52045204
string: 'string',
52055205
intValue: 1,
52065206
doubleValue: 1.0,
@@ -5263,14 +5263,14 @@ class CelestFunctionsMetadata {
52635263
return;
52645264
}
52655265

5266-
@Exportable()
5266+
@Exportable.new()
52675267
@_$celest.CloudFunction(
52685268
api: 'metadata',
52695269
function: 'hasExportableConstructedAnnotation',
52705270
)
52715271
Future<void> hasExportableConstructedAnnotation(
5272-
@Exportable() String value, {
5273-
@Exportable() String named = 'named',
5272+
@Exportable.new() String value, {
5273+
@Exportable.new() String named = 'named',
52745274
}) async {
52755275
final $response = await celest.httpClient.post(
52765276
celest.baseUri.resolve('/metadata/has-exportable-constructed-annotation'),
@@ -5334,7 +5334,7 @@ class CelestFunctionsMetadata {
53345334
bool boolValue = true,
53355335
List<String> list = const ['list'],
53365336
Map<String, String> map = const {'map': 'map'},
5337-
Exportable exportable = const Exportable(),
5337+
Exportable exportable = const Exportable.new(),
53385338
Serializable serializable = const Serializable.forType('String'),
53395339
LiteralEnum enumValue = LiteralEnum.a,
53405340
({
@@ -5387,7 +5387,7 @@ class CelestFunctionsMetadata {
53875387
bool? boolValue = true,
53885388
List<String>? list = const ['list'],
53895389
Map<String, String>? map = const {'map': 'map'},
5390-
Exportable? exportable = const Exportable(),
5390+
Exportable? exportable = const Exportable.new(),
53915391
Serializable? serializable = const Serializable.forType('String'),
53925392
LiteralEnum? enumValue = LiteralEnum.a,
53935393
({
@@ -5440,7 +5440,7 @@ class CelestFunctionsMetadata {
54405440
bool boolValue = true,
54415441
List<String> list = const ['list'],
54425442
Map<String, String> map = const {'map': 'map'},
5443-
Exportable exportable = const Exportable(),
5443+
Exportable exportable = const Exportable.new(),
54445444
Serializable serializable = const Serializable.forType('String'),
54455445
LiteralEnum enumValue = LiteralEnum.a,
54465446
({
@@ -5493,7 +5493,7 @@ class CelestFunctionsMetadata {
54935493
bool? boolValue = true,
54945494
List<String>? list = const ['list'],
54955495
Map<String, String>? map = const {'map': 'map'},
5496-
Exportable? exportable = const Exportable(),
5496+
Exportable? exportable = const Exportable.new(),
54975497
Serializable? serializable = const Serializable.forType('String'),
54985498
LiteralEnum? enumValue = LiteralEnum.a,
54995499
({
@@ -5749,7 +5749,7 @@ class CelestFunctionsMetadata {
57495749
String b,
57505750
String c
57515751
}) recordValue = const (a: 'a', b: 'b', c: 'c'),
5752-
Exportable exportable = const Exportable(),
5752+
Exportable exportable = const Exportable.new(),
57535753
Serializable serializable = const Serializable.forType('String'),
57545754
]) async {
57555755
final $response = await celest.httpClient.post(
@@ -5802,7 +5802,7 @@ class CelestFunctionsMetadata {
58025802
String b,
58035803
String c
58045804
})? recordValue = const (a: 'a', b: 'b', c: 'c'),
5805-
Exportable? exportable = const Exportable(),
5805+
Exportable? exportable = const Exportable.new(),
58065806
Serializable? serializable = const Serializable.forType('String'),
58075807
]) async {
58085808
final $response = await celest.httpClient.post(
@@ -5856,7 +5856,7 @@ class CelestFunctionsMetadata {
58565856
String b,
58575857
String c
58585858
}) recordValue = const (a: 'a', b: 'b', c: 'c'),
5859-
Exportable exportable = const Exportable(),
5859+
Exportable exportable = const Exportable.new(),
58605860
Serializable serializable = const Serializable.forType('String'),
58615861
}) async {
58625862
final $response = await celest.httpClient.post(
@@ -5909,7 +5909,7 @@ class CelestFunctionsMetadata {
59095909
String b,
59105910
String c
59115911
})? recordValue = const (a: 'a', b: 'b', c: 'c'),
5912-
Exportable? exportable = const Exportable(),
5912+
Exportable? exportable = const Exportable.new(),
59135913
Serializable? serializable = const Serializable.forType('String'),
59145914
}) async {
59155915
final $response = await celest.httpClient.post(

0 commit comments

Comments
 (0)