Version 2.10.0-63.0.dev
Merge commit '62093ca8ede6cac91c9724907b31a05bb85cac56' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9eefa2..b6a1a79c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -60,6 +60,13 @@
* Fix: Avoid exponential behaviour of error reporting from the solver.
* Fix: Refresh binstubs after recompile in global run.
+## 2.9.2 - 2020-08-26
+
+This is a patch release that fixes transient StackOverflow exceptions when
+building Flutter applications (issue [flutter/flutter#63560][]).
+
+[flutter/flutter#63560]: https://github.com/flutter/flutter/issues/63560
+
## 2.9.1 - 2020-08-12
This is a patch release that fixes unhandled exceptions in some Flutter
diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
index e13f628..7e0865d 100644
--- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
@@ -2550,6 +2550,29 @@
tip: r"""Try putting parentheses around one of the comparisons.""");
// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(Uri uri_, String string)>
+ templateExceptionReadingFile =
+ const Template<Message Function(Uri uri_, String string)>(
+ messageTemplate: r"""Exception when reading '#uri': #string""",
+ withArguments: _withArgumentsExceptionReadingFile);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Uri uri_, String string)> codeExceptionReadingFile =
+ const Code<Message Function(Uri uri_, String string)>(
+ "ExceptionReadingFile",
+ templateExceptionReadingFile,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsExceptionReadingFile(Uri uri_, String string) {
+ String uri = relativizeUri(uri_);
+ if (string.isEmpty) throw 'No string provided';
+ return new Message(codeExceptionReadingFile,
+ message: """Exception when reading '${uri}': ${string}""",
+ arguments: {'uri': uri_, 'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
const Template<Message Function(String string)> templateExpectedAfterButGot =
const Template<Message Function(String string)>(
messageTemplate: r"""Expected '#string' after this.""",
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index 4520870..87bf120 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -48,6 +48,7 @@
templateCannotReadSdkSpecification,
templateCantReadFile,
templateDebugTrace,
+ templateExceptionReadingFile,
templateInputFileNotFound,
templateInternalProblemUnsupported,
templatePackagesFileFormat,
@@ -526,6 +527,14 @@
reportWithoutLocation(
templateCantReadFile.withArguments(uri, e.message), Severity.error);
}
+ } catch (e) {
+ Message message =
+ templateExceptionReadingFile.withArguments(uri, e.message);
+ reportWithoutLocation(message, Severity.error);
+ // We throw a new exception to ensure that the message include the uri
+ // that led to the exception. Exceptions in Uri don't include the
+ // offending uri in the exception message.
+ throw new ArgumentError(message.message);
}
return null;
}
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 742b62a..cbf22b3 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -187,6 +187,8 @@
DuplicatedNamedArgument/example: Fail
DuplicatedParameterName/example: Fail
DuplicatePrefix/example: Fail
+ExceptionReadingFile/analyzerCode: Fail
+ExceptionReadingFile/example: Fail
Encoding/analyzerCode: Fail
EnumConstantSameNameAsEnclosing/example: Fail
EnumInstantiation/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 2bd6be7..04dd919 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -3567,6 +3567,9 @@
main() {
}
+ExceptionReadingFile:
+ template: "Exception when reading '#uri': #string"
+
PackagesFileFormat:
template: "Problem in packages configuration file: #string"
external: test/packages_format_error_test.dart
diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt
index a83f2e5..e6e026a 100644
--- a/pkg/front_end/test/spell_checking_list_code.txt
+++ b/pkg/front_end/test/spell_checking_list_code.txt
@@ -739,6 +739,7 @@
occasionally
occupied
occurences
+offending
offs
ogham
oked
diff --git a/tools/VERSION b/tools/VERSION
index 98a5680..a3caac9 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 10
PATCH 0
-PRERELEASE 62
+PRERELEASE 63
PRERELEASE_PATCH 0
\ No newline at end of file