From 77a4022f9ffb5a28b490a993de1de3e278dbb202 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 12 Dec 2023 17:45:13 +0000 Subject: [PATCH] Upgrade pkg/language_versioning_2_7_test to 2.12/2.13. This package tests the language versioning infrastructure, in particular how it interacts with imports, exports, and part files. With the removal of legacy (pre-2.12) support from Dart, we need the tests in this package to use newer language versions. Change-Id: I415307a8e644c756da649d7d51da860b5b37de7b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341022 Reviewed-by: Jake Macdonald Commit-Queue: Paul Berry --- .../OWNERS | 0 .../analysis_options.yaml | 6 +++--- .../pubspec.yaml | 4 ++-- .../test/lib_ex2.12_test.dart} | 14 +++++++------- .../test/lib_ex2.13_test.dart} | 14 +++++++------- .../test/lib_im2.12_test.dart} | 14 +++++++------- .../test/src/part_of_ex2.12_v_ex2.12.dart} | 6 +++--- .../test/src/part_of_ex2.12_v_ex2.13.dart} | 6 +++--- .../test/src/part_of_ex2.12_v_im2.12.dart} | 6 +++--- .../test/src/part_of_ex2.13_v_ex2.12.dart} | 6 +++--- .../test/src/part_of_ex2.13_v_ex2.13.dart} | 6 +++--- .../test/src/part_of_ex2.13_v_im2.12.dart | 9 +++++++++ .../test/src/part_of_im2.12_v_ex2.12.dart | 9 +++++++++ .../test/src/part_of_im2.12_v_ex2.13.dart | 9 +++++++++ .../test/src/part_of_im2.12_v_im2.12.dart | 9 +++++++++ .../test/src/part_of_ex2.8_v_im2.7.dart | 9 --------- .../test/src/part_of_im2.7_v_ex2.7.dart | 9 --------- .../test/src/part_of_im2.7_v_ex2.8.dart | 9 --------- .../test/src/part_of_im2.7_v_im2.7.dart | 9 --------- 19 files changed, 77 insertions(+), 77 deletions(-) rename pkg/{language_versioning_2_7_test => language_versioning_2_12_test}/OWNERS (100%) rename pkg/{language_versioning_2_7_test => language_versioning_2_12_test}/analysis_options.yaml (62%) rename pkg/{language_versioning_2_7_test => language_versioning_2_12_test}/pubspec.yaml (83%) rename pkg/{language_versioning_2_7_test/test/lib_ex2.7_test.dart => language_versioning_2_12_test/test/lib_ex2.12_test.dart} (75%) rename pkg/{language_versioning_2_7_test/test/lib_ex2.8_test.dart => language_versioning_2_12_test/test/lib_ex2.13_test.dart} (71%) rename pkg/{language_versioning_2_7_test/test/lib_im2.7_test.dart => language_versioning_2_12_test/test/lib_im2.12_test.dart} (72%) rename pkg/{language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.7.dart => language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.12.dart} (76%) rename pkg/{language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.7.dart => language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.13.dart} (76%) rename pkg/{language_versioning_2_7_test/test/src/part_of_ex2.7_v_im2.7.dart => language_versioning_2_12_test/test/src/part_of_ex2.12_v_im2.12.dart} (67%) rename pkg/{language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.8.dart => language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.12.dart} (76%) rename pkg/{language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.8.dart => language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.13.dart} (76%) create mode 100644 pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_im2.12.dart create mode 100644 pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.12.dart create mode 100644 pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.13.dart create mode 100644 pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_im2.12.dart delete mode 100644 pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_im2.7.dart delete mode 100644 pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.7.dart delete mode 100644 pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.8.dart delete mode 100644 pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_im2.7.dart diff --git a/pkg/language_versioning_2_7_test/OWNERS b/pkg/language_versioning_2_12_test/OWNERS similarity index 100% rename from pkg/language_versioning_2_7_test/OWNERS rename to pkg/language_versioning_2_12_test/OWNERS diff --git a/pkg/language_versioning_2_7_test/analysis_options.yaml b/pkg/language_versioning_2_12_test/analysis_options.yaml similarity index 62% rename from pkg/language_versioning_2_7_test/analysis_options.yaml rename to pkg/language_versioning_2_12_test/analysis_options.yaml index 3e707e8601a..a7217bf2f00 100644 --- a/pkg/language_versioning_2_7_test/analysis_options.yaml +++ b/pkg/language_versioning_2_12_test/analysis_options.yaml @@ -5,6 +5,6 @@ analyzer: illegal_language_version_override: ignore exclude: # These files have intentional errors. - - test/lib_ex2.7_test.dart - - test/lib_ex2.8_test.dart - - test/lib_im2.7_test.dart + - test/lib_ex2.12_test.dart + - test/lib_ex2.13_test.dart + - test/lib_im2.12_test.dart diff --git a/pkg/language_versioning_2_7_test/pubspec.yaml b/pkg/language_versioning_2_12_test/pubspec.yaml similarity index 83% rename from pkg/language_versioning_2_7_test/pubspec.yaml rename to pkg/language_versioning_2_12_test/pubspec.yaml index 7e17122015e..24e0fedf56c 100644 --- a/pkg/language_versioning_2_7_test/pubspec.yaml +++ b/pkg/language_versioning_2_12_test/pubspec.yaml @@ -1,4 +1,4 @@ -name: language_versioning_2_7_test +name: language_versioning_2_12_test version: 1.0.0 description: > Tests of language versioning. Stored as a package in order to have its own @@ -8,7 +8,7 @@ description: > publish_to: none environment: - sdk: '>=2.7.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dev_dependencies: lints: any diff --git a/pkg/language_versioning_2_7_test/test/lib_ex2.7_test.dart b/pkg/language_versioning_2_12_test/test/lib_ex2.12_test.dart similarity index 75% rename from pkg/language_versioning_2_7_test/test/lib_ex2.7_test.dart rename to pkg/language_versioning_2_12_test/test/lib_ex2.12_test.dart index 4ce82926be5..aa569f6f18c 100644 --- a/pkg/language_versioning_2_7_test/test/lib_ex2.7_test.dart +++ b/pkg/language_versioning_2_12_test/test/lib_ex2.12_test.dart @@ -3,24 +3,24 @@ // governed by a BSD-style license that can be found in the LICENSE file. // Explicit version. -// @dart=2.7 +// @dart=2.12 -part "src/part_of_ex2.7_v_ex2.7.dart"; +part "src/part_of_ex2.12_v_ex2.12.dart"; // Specification requires the part file to have // the same explicit language version marker // as the including library, // not just the same language version. -part "src/part_of_ex2.7_v_im2.7.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +part "src/part_of_ex2.12_v_im2.12.dart"; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE // [cfe] The language version override has to be the same in the library and its part(s). -part "src/part_of_ex2.7_v_ex2.8.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +part "src/part_of_ex2.12_v_ex2.13.dart"; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE // [cfe] The language version override has to be the same in the library and its part(s). main() { - print(x27x27); + print(x212x212); } diff --git a/pkg/language_versioning_2_7_test/test/lib_ex2.8_test.dart b/pkg/language_versioning_2_12_test/test/lib_ex2.13_test.dart similarity index 71% rename from pkg/language_versioning_2_7_test/test/lib_ex2.8_test.dart rename to pkg/language_versioning_2_12_test/test/lib_ex2.13_test.dart index 52c191d252f..a0f4d838c23 100644 --- a/pkg/language_versioning_2_7_test/test/lib_ex2.8_test.dart +++ b/pkg/language_versioning_2_12_test/test/lib_ex2.13_test.dart @@ -3,20 +3,20 @@ // governed by a BSD-style license that can be found in the LICENSE file. // Explicit version. -// @dart=2.8 +// @dart=2.13 -part "src/part_of_ex2.8_v_ex2.8.dart"; +part "src/part_of_ex2.13_v_ex2.13.dart"; -part "src/part_of_ex2.8_v_ex2.7.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +part "src/part_of_ex2.13_v_ex2.12.dart"; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE // [cfe] The language version override has to be the same in the library and its part(s). -part "src/part_of_ex2.8_v_im2.7.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +part "src/part_of_ex2.13_v_im2.12.dart"; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE // [cfe] The language version override has to be the same in the library and its part(s). void main() { - print(x28x28); + print(x213x213); } diff --git a/pkg/language_versioning_2_7_test/test/lib_im2.7_test.dart b/pkg/language_versioning_2_12_test/test/lib_im2.12_test.dart similarity index 72% rename from pkg/language_versioning_2_7_test/test/lib_im2.7_test.dart rename to pkg/language_versioning_2_12_test/test/lib_im2.12_test.dart index 4d2d3316e5d..2d52b76bb1e 100644 --- a/pkg/language_versioning_2_7_test/test/lib_im2.7_test.dart +++ b/pkg/language_versioning_2_12_test/test/lib_im2.12_test.dart @@ -2,24 +2,24 @@ // file for details. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. -// Implicit language version 2.7 from configuration. +// Implicit language version 2.12 from configuration. -part "src/part_of_im2.7_v_im2.7.dart"; +part "src/part_of_im2.12_v_im2.12.dart"; // Specification requires the part fsrc/ile to have // the same explicit language version marker // as the including library, // not just the same language version. -part "src/part_of_im2.7_v_ex2.7.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +part "src/part_of_im2.12_v_ex2.12.dart"; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE // [cfe] The language version override has to be the same in the library and its part(s). -part "src/part_of_im2.7_v_ex2.8.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +part "src/part_of_im2.12_v_ex2.13.dart"; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_LANGUAGE_VERSION_OVERRIDE // [cfe] The language version override has to be the same in the library and its part(s). void main() { - print(i27i27); + print(i212i212); } diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.7.dart b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.12.dart similarity index 76% rename from pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.7.dart rename to pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.12.dart index faab98cb0a1..c2b9e3e1823 100644 --- a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.7.dart +++ b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.12.dart @@ -2,8 +2,8 @@ // file for details. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. -// @dart=2.7 +// @dart=2.12 -part of "../lib_ex2.8_test.dart"; +part of "../lib_ex2.12_test.dart"; -var x28x27 = 0; +var x212x212 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.7.dart b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.13.dart similarity index 76% rename from pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.7.dart rename to pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.13.dart index e47db7c558d..6123756325d 100644 --- a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.7.dart +++ b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_ex2.13.dart @@ -2,8 +2,8 @@ // file for details. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. -// @dart=2.7 +// @dart=2.13 -part of "../lib_ex2.7_test.dart"; +part of "../lib_ex2.12_test.dart"; -var x27x27 = 0; +var v212x213 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_im2.7.dart b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_im2.12.dart similarity index 67% rename from pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_im2.7.dart rename to pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_im2.12.dart index a18cfd92185..eb5984e5eae 100644 --- a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_im2.7.dart +++ b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.12_v_im2.12.dart @@ -2,8 +2,8 @@ // file for details. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. -// Implicit language version 2.7 from configuration. +// Implicit language version 2.12 from configuration. -part of "../lib_ex2.7_test.dart"; +part of "../lib_ex2.12_test.dart"; -var x27i27 = 0; +var x212i212 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.8.dart b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.12.dart similarity index 76% rename from pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.8.dart rename to pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.12.dart index 070f6fbe578..390716a4a14 100644 --- a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.7_v_ex2.8.dart +++ b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.12.dart @@ -2,8 +2,8 @@ // file for details. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. -// @dart=2.8 +// @dart=2.12 -part of "../lib_ex2.7_test.dart"; +part of "../lib_ex2.13_test.dart"; -var v27x28 = 0; +var x213x212 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.8.dart b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.13.dart similarity index 76% rename from pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.8.dart rename to pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.13.dart index 6957d940544..4ea6ae43240 100644 --- a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_ex2.8.dart +++ b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_ex2.13.dart @@ -2,8 +2,8 @@ // file for details. All rights reserved. Use of this source code is // governed by a BSD-style license that can be found in the LICENSE file. -// @dart=2.8 +// @dart=2.13 -part of "../lib_ex2.8_test.dart"; +part of "../lib_ex2.13_test.dart"; -var x28x28 = 0; +var x213x213 = 0; diff --git a/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_im2.12.dart b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_im2.12.dart new file mode 100644 index 00000000000..27bbddddeec --- /dev/null +++ b/pkg/language_versioning_2_12_test/test/src/part_of_ex2.13_v_im2.12.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS +// file for details. All rights reserved. Use of this source code is +// governed by a BSD-style license that can be found in the LICENSE file. + +// Implicit language version 2.12 from configuration. + +part of "../lib_ex2.13_test.dart"; + +var x213i212 = 0; diff --git a/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.12.dart b/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.12.dart new file mode 100644 index 00000000000..0fa3a6a38ef --- /dev/null +++ b/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.12.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS +// file for details. All rights reserved. Use of this source code is +// governed by a BSD-style license that can be found in the LICENSE file. + +// @dart=2.12 + +part of "../lib_im2.12_test.dart"; + +var i212x212 = 0; diff --git a/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.13.dart b/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.13.dart new file mode 100644 index 00000000000..a867ff4e7e3 --- /dev/null +++ b/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_ex2.13.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS +// file for details. All rights reserved. Use of this source code is +// governed by a BSD-style license that can be found in the LICENSE file. + +// @dart=2.13 + +part of "../lib_im2.12_test.dart"; + +var i212x213 = 0; diff --git a/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_im2.12.dart b/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_im2.12.dart new file mode 100644 index 00000000000..e62e818e7e9 --- /dev/null +++ b/pkg/language_versioning_2_12_test/test/src/part_of_im2.12_v_im2.12.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS +// file for details. All rights reserved. Use of this source code is +// governed by a BSD-style license that can be found in the LICENSE file. + +// Implicit language version 2.12 from configuration. + +part of "../lib_im2.12_test.dart"; + +var i212i212 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_im2.7.dart b/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_im2.7.dart deleted file mode 100644 index d96ba59fff3..00000000000 --- a/pkg/language_versioning_2_7_test/test/src/part_of_ex2.8_v_im2.7.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS -// file for details. All rights reserved. Use of this source code is -// governed by a BSD-style license that can be found in the LICENSE file. - -// Implicit language version 2.7 from configuration. - -part of "../lib_ex2.8_test.dart"; - -var x28i27 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.7.dart b/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.7.dart deleted file mode 100644 index a4d22128b22..00000000000 --- a/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.7.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS -// file for details. All rights reserved. Use of this source code is -// governed by a BSD-style license that can be found in the LICENSE file. - -// @dart=2.7 - -part of "../lib_im2.7_test.dart"; - -var i27x27 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.8.dart b/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.8.dart deleted file mode 100644 index bedd006a718..00000000000 --- a/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_ex2.8.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS -// file for details. All rights reserved. Use of this source code is -// governed by a BSD-style license that can be found in the LICENSE file. - -// @dart=2.8 - -part of "../lib_im2.7_test.dart"; - -var i27x28 = 0; diff --git a/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_im2.7.dart b/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_im2.7.dart deleted file mode 100644 index aed5ff38e36..00000000000 --- a/pkg/language_versioning_2_7_test/test/src/part_of_im2.7_v_im2.7.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS -// file for details. All rights reserved. Use of this source code is -// governed by a BSD-style license that can be found in the LICENSE file. - -// Implicit language version 2.7 from configuration. - -part of "../lib_im2.7_test.dart"; - -var i27i27 = 0;