From e6a0f3655f364acde36b0264fb1b48e3a0866ed2 Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Mon, 27 Oct 2025 15:20:24 +0100 Subject: [PATCH 1/2] Retire experiments that are now released. --- pubspec.yaml | 4 +-- .../expression/collection_null_aware.stmt | 7 +++--- .../collection_null_aware_comment.stmt | 3 +-- test/tall/invocation/dot_shorthand.stmt | 25 +++++++++---------- .../invocation/dot_shorthand_comment.stmt | 9 +++---- 5 files changed, 22 insertions(+), 26 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 31ef62e2..f50a44a0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,10 +6,10 @@ description: >- Provides an API and a CLI tool. repository: https://github.com/dart-lang/dart_style environment: - sdk: ^3.7.0 + sdk: ^3.10.0 dependencies: - analyzer: ^8.1.0 + analyzer: ^8.4.0 args: ^2.0.0 collection: ^1.19.0 package_config: ^2.1.0 diff --git a/test/tall/expression/collection_null_aware.stmt b/test/tall/expression/collection_null_aware.stmt index a82e7e40..d6c9dda8 100644 --- a/test/tall/expression/collection_null_aware.stmt +++ b/test/tall/expression/collection_null_aware.stmt @@ -1,5 +1,4 @@ 40 columns | -(experiment null-aware-elements) >>> List element. var list = [ ? x ]; <<< 3.8 @@ -27,7 +26,7 @@ var list = [ ?(veryLongExpression + thatIsForcedToSplit), ]; ->>> (experiment dot-shorthands) Preserves space for dot shorthand. +>>> Preserves space for dot shorthand. ### If the space between `?` and `.` is removed, it would become a single `?.` ### token and thus a parse error. var list = [ @@ -41,12 +40,12 @@ var list = [ ?.invocation(), ?.new(), ]; ->>> (experiment dot-shorthands) Ambiguous dot shorthand versus null-aware. +>>> Ambiguous dot shorthand versus null-aware. ### Because there is no space in "?.", it must be a null-aware access in a map. c = { e1 ?. e2 : e3 }; <<< 3.10 c = {e1?.e2: e3}; ->>> (experiment dot-shorthands) Ambiguous dot shorthand versus null-aware. +>>> Ambiguous dot shorthand versus null-aware. ### Because there is a space in "? .", it must be a dot shorthand in a set. c = { e1 ? . e2 : e3 }; <<< 3.10 diff --git a/test/tall/expression/collection_null_aware_comment.stmt b/test/tall/expression/collection_null_aware_comment.stmt index e8bbd8b3..0dae040d 100644 --- a/test/tall/expression/collection_null_aware_comment.stmt +++ b/test/tall/expression/collection_null_aware_comment.stmt @@ -1,5 +1,4 @@ 40 columns | -(experiment null-aware-elements) >>> Inline comment after `?`. var list = [ ? /* c */ x ]; <<< 3.8 @@ -33,7 +32,7 @@ var map = { ? // c value, }; ->>> (experiment dot-shorthands) Comment between `?` and `.` of dot shorthand. +>>> Comment between `?` and `.` of dot shorthand. var list = [ ? /* c */ . property , ? // c diff --git a/test/tall/invocation/dot_shorthand.stmt b/test/tall/invocation/dot_shorthand.stmt index 0bafee2a..cb2b348f 100644 --- a/test/tall/invocation/dot_shorthand.stmt +++ b/test/tall/invocation/dot_shorthand.stmt @@ -1,16 +1,15 @@ 40 columns | -(experiment dot-shorthands) >>> Getter. variable = . getter; -<<< 3.9 +<<< 3.10 variable = .getter; >>> Method call with unsplit arguments. variable = .method(1,x:2,3,y:4); -<<< 3.9 +<<< 3.10 variable = .method(1, x: 2, 3, y: 4); >>> Method call with split arguments. variable = .method(one, x: two, three, y: four); -<<< 3.9 +<<< 3.10 variable = .method( one, x: two, @@ -19,34 +18,34 @@ variable = .method( ); >>> Generic method call. variable = . method < int , String > ( ) ; -<<< 3.9 +<<< 3.10 variable = .method(); >>> Constructor. variable = .new(1); -<<< 3.9 +<<< 3.10 variable = .new(1); >>> Const constructor. variable = const . new ( ); -<<< 3.9 +<<< 3.10 variable = const .new(); >>> Const named constructor. variable = const . named ( ); -<<< 3.9 +<<< 3.10 variable = const .named(); >>> Unsplit selector chain. v = . property . method() . x . another(); -<<< 3.9 +<<< 3.10 v = .property.method().x.another(); >>> Split selector chain on shorthand getter. variable = .shorthand.method().another().third(); -<<< 3.9 +<<< 3.10 variable = .shorthand .method() .another() .third(); >>> Split selector chain on shorthand method. variable = .shorthand().method().getter.another().third(); -<<< 3.9 +<<< 3.10 variable = .shorthand() .method() .getter @@ -55,7 +54,7 @@ variable = .shorthand() >>> Split in shorthand method call argument list. context(.shorthand(argument, anotherArgument, thirdArgument) .chain().another().third().fourthOne()); -<<< 3.9 +<<< 3.10 context( .shorthand( argument, @@ -69,7 +68,7 @@ context( ); >>> Nested call. .method(.getter,.method(.new(.new())),const.ctor()); -<<< +<<< 3.10 .method( .getter, .method(.new(.new())), diff --git a/test/tall/invocation/dot_shorthand_comment.stmt b/test/tall/invocation/dot_shorthand_comment.stmt index d5cde8c4..89a35d4d 100644 --- a/test/tall/invocation/dot_shorthand_comment.stmt +++ b/test/tall/invocation/dot_shorthand_comment.stmt @@ -1,26 +1,25 @@ 40 columns | -(experiment dot-shorthands) >>> Line comment after dot. variable = . // Comment. whoDoesThis(); -<<< 3.9 +<<< 3.10 variable = . // Comment. whoDoesThis(); >>> Block comment after dot. variable = ./* Comment. */whoDoesThis(); -<<< 3.9 +<<< 3.10 variable = . /* Comment. */ whoDoesThis(); >>> Line comment after `const`. variable = const // Comment. . whoDoesThis(); -<<< 3.9 +<<< 3.10 variable = const // Comment. .whoDoesThis(); >>> Block comment after `const`. variable = const/* Comment. */.whoDoesThis(); -<<< 3.9 +<<< 3.10 variable = const /* Comment. */ .whoDoesThis(); From 564df1bcaccb630f85429ad589f8ab6ae68eca59 Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Mon, 27 Oct 2025 17:18:29 +0100 Subject: [PATCH 2/2] Update Dart SDK version in workflow Test with 3.10.0 SDK --- .github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 0ec1167e..7e76fcb9 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [3.7.0, dev] + sdk: [3.10.0, dev] steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c