Skip to content

Commit

Permalink
Version 3.7.0-29.0.dev
Browse files Browse the repository at this point in the history
Merge 307e5a6 into dev
  • Loading branch information
Dart CI committed Oct 16, 2024
2 parents 97ad2c8 + 307e5a6 commit 5b7d8b1
Show file tree
Hide file tree
Showing 56 changed files with 316 additions and 216 deletions.
140 changes: 116 additions & 24 deletions pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11273,59 +11273,151 @@ const MessageCode messageLanguageVersionPatchContext = const MessageCode(
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(int count, int count2)>
templateLanguageVersionTooHigh =
const Template<Message Function(int count, int count2)>(
"LanguageVersionTooHigh",
const Template<Message Function(int count, int count2, int count3, int count4)>
templateLanguageVersionTooHighExplicit = const Template<
Message Function(int count, int count2, int count3, int count4)>(
"LanguageVersionTooHighExplicit",
problemMessageTemplate:
r"""The specified language version is too high. The highest supported language version is #count.#count2.""",
withArguments: _withArgumentsLanguageVersionTooHigh,
r"""The specified language version #count.#count2 is too high. The highest supported language version is #count3.#count4.""",
withArguments: _withArgumentsLanguageVersionTooHighExplicit,
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(int count, int count2)> codeLanguageVersionTooHigh =
const Code<Message Function(int count, int count2)>(
"LanguageVersionTooHigh",
const Code<Message Function(int count, int count2, int count3, int count4)>
codeLanguageVersionTooHighExplicit =
const Code<Message Function(int count, int count2, int count3, int count4)>(
"LanguageVersionTooHighExplicit",
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLanguageVersionTooHigh(int count, int count2) {
Message _withArgumentsLanguageVersionTooHighExplicit(
int count, int count2, int count3, int count4) {
return new Message(
codeLanguageVersionTooHigh,
codeLanguageVersionTooHighExplicit,
problemMessage:
"""The specified language version is too high. The highest supported language version is ${count}.${count2}.""",
"""The specified language version ${count}.${count2} is too high. The highest supported language version is ${count3}.${count4}.""",
arguments: {
'count': count,
'count2': count2,
'count3': count3,
'count4': count4,
},
);
}

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(int count, int count2)>
templateLanguageVersionTooLow =
const Template<Message Function(int count, int count2)>(
"LanguageVersionTooLow",
const Template<
Message Function(
int count, int count2, String name, int count3, int count4)>
templateLanguageVersionTooHighPackage = const Template<
Message Function(
int count, int count2, String name, int count3, int count4)>(
"LanguageVersionTooHighPackage",
problemMessageTemplate:
r"""The specified language version is too low. The lowest supported language version is #count.#count2.""",
withArguments: _withArgumentsLanguageVersionTooLow,
r"""The language version #count.#count2 specified for the package '#name' is too high. The highest supported language version is #count3.#count4.""",
withArguments: _withArgumentsLanguageVersionTooHighPackage,
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<Message Function(int count, int count2)> codeLanguageVersionTooLow =
const Code<Message Function(int count, int count2)>(
"LanguageVersionTooLow",
const Code<
Message Function(
int count, int count2, String name, int count3, int count4)>
codeLanguageVersionTooHighPackage = const Code<
Message Function(
int count, int count2, String name, int count3, int count4)>(
"LanguageVersionTooHighPackage",
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLanguageVersionTooHighPackage(
int count, int count2, String name, int count3, int count4) {
if (name.isEmpty) throw 'No name provided';
name = demangleMixinApplicationName(name);
return new Message(
codeLanguageVersionTooHighPackage,
problemMessage:
"""The language version ${count}.${count2} specified for the package '${name}' is too high. The highest supported language version is ${count3}.${count4}.""",
arguments: {
'count': count,
'count2': count2,
'name': name,
'count3': count3,
'count4': count4,
},
);
}

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(int count, int count2, int count3, int count4)>
templateLanguageVersionTooLowExplicit = const Template<
Message Function(int count, int count2, int count3, int count4)>(
"LanguageVersionTooLowExplicit",
problemMessageTemplate:
r"""The specified language version #count.#count2 is too low. The lowest supported language version is #count3.#count4.""",
withArguments: _withArgumentsLanguageVersionTooLowExplicit,
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLanguageVersionTooLow(int count, int count2) {
const Code<Message Function(int count, int count2, int count3, int count4)>
codeLanguageVersionTooLowExplicit =
const Code<Message Function(int count, int count2, int count3, int count4)>(
"LanguageVersionTooLowExplicit",
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLanguageVersionTooLowExplicit(
int count, int count2, int count3, int count4) {
return new Message(
codeLanguageVersionTooLow,
codeLanguageVersionTooLowExplicit,
problemMessage:
"""The specified language version is too low. The lowest supported language version is ${count}.${count2}.""",
"""The specified language version ${count}.${count2} is too low. The lowest supported language version is ${count3}.${count4}.""",
arguments: {
'count': count,
'count2': count2,
'count3': count3,
'count4': count4,
},
);
}

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<
Message Function(
int count, int count2, String name, int count3, int count4)>
templateLanguageVersionTooLowPackage = const Template<
Message Function(
int count, int count2, String name, int count3, int count4)>(
"LanguageVersionTooLowPackage",
problemMessageTemplate:
r"""The language version #count.#count2 specified for the package '#name' is too low. The lowest supported language version is #count3.#count4.""",
withArguments: _withArgumentsLanguageVersionTooLowPackage,
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Code<
Message Function(
int count, int count2, String name, int count3, int count4)>
codeLanguageVersionTooLowPackage = const Code<
Message Function(
int count, int count2, String name, int count3, int count4)>(
"LanguageVersionTooLowPackage",
);

// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
Message _withArgumentsLanguageVersionTooLowPackage(
int count, int count2, String name, int count3, int count4) {
if (name.isEmpty) throw 'No name provided';
name = demangleMixinApplicationName(name);
return new Message(
codeLanguageVersionTooLowPackage,
problemMessage:
"""The language version ${count}.${count2} specified for the package '${name}' is too low. The lowest supported language version is ${count3}.${count4}.""",
arguments: {
'count': count,
'count2': count2,
'name': name,
'count3': count3,
'count4': count4,
},
);
}
Expand Down
8 changes: 6 additions & 2 deletions pkg/front_end/lib/src/source/source_compilation_unit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
// If trying to set a language version that is higher than the current sdk
// version it's an error.
addPostponedProblem(
templateLanguageVersionTooHigh.withArguments(
templateLanguageVersionTooHighExplicit.withArguments(
version.major,
version.minor,
loader.target.currentSdkVersion.major,
loader.target.currentSdkVersion.minor),
offset,
Expand All @@ -363,7 +365,9 @@ class SourceCompilationUnitImpl implements SourceCompilationUnit {
fileUri, offset, length, packageLanguageVersion.version, true);
} else if (version < loader.target.leastSupportedVersion) {
addPostponedProblem(
templateLanguageVersionTooLow.withArguments(
templateLanguageVersionTooLowExplicit.withArguments(
version.major,
version.minor,
loader.target.leastSupportedVersion.major,
loader.target.leastSupportedVersion.minor),
offset,
Expand Down
10 changes: 8 additions & 2 deletions pkg/front_end/lib/src/source/source_loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,20 @@ class SourceLoader extends Loader {
if (version > target.currentSdkVersion) {
// Coverage-ignore-block(suite): Not run.
packageLanguageVersionProblem =
templateLanguageVersionTooHigh.withArguments(
templateLanguageVersionTooHighPackage.withArguments(
version.major,
version.minor,
packageForLanguageVersion.name,
target.currentSdkVersion.major,
target.currentSdkVersion.minor);
packageLanguageVersion = new InvalidLanguageVersion(
fileUri, 0, noLength, target.currentSdkVersion, false);
} else if (version < target.leastSupportedVersion) {
packageLanguageVersionProblem =
templateLanguageVersionTooLow.withArguments(
templateLanguageVersionTooLowPackage.withArguments(
version.major,
version.minor,
packageForLanguageVersion.name,
target.leastSupportedVersion.major,
target.leastSupportedVersion.minor);
packageLanguageVersion = new InvalidLanguageVersion(
Expand Down
12 changes: 8 additions & 4 deletions pkg/front_end/messages.status
Original file line number Diff line number Diff line change
Expand Up @@ -708,10 +708,14 @@ LanguageVersionMismatchInPart/analyzerCode: Fail
LanguageVersionMismatchInPart/part_wrapped_script: Fail # Part in (now) part.
LanguageVersionMismatchInPatch/analyzerCode: Fail
LanguageVersionMismatchInPatch/example: Fail
LanguageVersionTooHigh/analyzerCode: Fail
LanguageVersionTooHigh/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification.
LanguageVersionTooLow/analyzerCode: Fail
LanguageVersionTooLow/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification.
LanguageVersionTooHighExplicit/analyzerCode: Fail
LanguageVersionTooHighExplicit/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification.
LanguageVersionTooHighPackage/analyzerCode: Fail
LanguageVersionTooHighPackage/example: Fail
LanguageVersionTooLowExplicit/analyzerCode: Fail
LanguageVersionTooLowExplicit/part_wrapped_script: Fail # Content comes after "part of [...]" meaning it's not actually a language version specification.
LanguageVersionTooLowPackage/analyzerCode: Fail
LanguageVersionTooLowPackage/example: Fail
LateDefinitelyAssignedError/analyzerCode: Fail
LateDefinitelyUnassignedError/analyzerCode: Fail
LibraryDirectiveNotFirst/part_wrapped_script1: Fail # Defining library name in the (now) part.
Expand Down
14 changes: 10 additions & 4 deletions pkg/front_end/messages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5369,16 +5369,22 @@ ExtensionTypeCombinedMemberSignatureFailed:
}
extension type C(I3 i) implements I2, I1 {}
LanguageVersionTooHigh:
problemMessage: "The specified language version is too high. The highest supported language version is #count.#count2."
LanguageVersionTooHighExplicit:
problemMessage: "The specified language version #count.#count2 is too high. The highest supported language version is #count3.#count4."
script: >
// @dart = 100.200
LanguageVersionTooLow:
problemMessage: "The specified language version is too low. The lowest supported language version is #count.#count2."
LanguageVersionTooHighPackage:
problemMessage: "The language version #count.#count2 specified for the package '#name' is too high. The highest supported language version is #count3.#count4."

LanguageVersionTooLowExplicit:
problemMessage: "The specified language version #count.#count2 is too low. The lowest supported language version is #count3.#count4."
script: >
// @dart = 2.9
LanguageVersionTooLowPackage:
problemMessage: "The language version #count.#count2 specified for the package '#name' is too low. The lowest supported language version is #count3.#count4."

LanguageVersionInvalidInDotPackages:
problemMessage: "The language version is not specified correctly in the packages file."
exampleAllowMoreCodes: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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.

/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighExplicit*/
// @dart = %TOO_HIGH_VERSION_MARKER%

// If no valid language version is specified, we default to the most recent one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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.

/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighExplicit*/
// @dart = %TOO_HIGH_VERSION_MARKER%

// @dart = %VERSION_MARKER1%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// range of the sdk. The library stays on the .dart_tool/package_config.json
// specified one (%VERSION_MARKER1%) and an error is issued.

/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighExplicit*/
// @dart = %TOO_HIGH_VERSION_MARKER%

/*library: languageVersion=%VERSION_MARKER1%*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighPackage*/
// Copyright (c) 2019, 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighPackage*/
// Copyright (c) 2019, 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.

/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighExplicit*/
// @dart = %TOO_HIGH_VERSION_MARKER%

/*library: languageVersion=%CURRENT_VERSION_MARKER%*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*error: errors=LanguageVersionTooHigh*/
/*error: errors=LanguageVersionTooHighPackage*/
// Copyright (c) 2019, 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.
Expand Down
3 changes: 2 additions & 1 deletion pkg/front_end/test/spell_checking_list_messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# automatic tools might move it to the top of the file.

JS
RecordUse
abispecificinteger
abispecificintegermapping
adjusting
Expand All @@ -35,6 +36,7 @@ conformance
constructor(s)
core
count.#count
count3.#count
createstaticinteropmock
d
dart.dev
Expand Down Expand Up @@ -120,7 +122,6 @@ preexisting
pubspec.yaml
r
re
RecordUse
refutable
resource
sdksummary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12.
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12.
// // @dart=2.11
// ^^^^^^^^^^^^^
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12.
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12.
// // @dart=2.11
// ^^^^^^^^^^^^^
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12.
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12.
// // @dart=2.11
// ^^^^^^^^^^^^^
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version is too low. The lowest supported language version is 2.12.
// pkg/front_end/testcases/general/least_supported_version.dart:5:1: Error: The specified language version 2.11 is too low. The lowest supported language version is 2.12.
// // @dart=2.11
// ^^^^^^^^^^^^^
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Problems outside component:
//
// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12.
// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out' is too low. The lowest supported language version is 2.12.
// // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// ^
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Problems outside component:
//
// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The specified language version is too low. The lowest supported language version is 2.12.
// pkg/front_end/testcases/general/least_supported_version/opt_out/lib/opt_out_lib.dart:1:1: Error: The language version 2.11 specified for the package 'opt_out' is too low. The lowest supported language version is 2.12.
// // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// ^
//
Expand Down
Loading

0 comments on commit 5b7d8b1

Please sign in to comment.