Version 2.7.0-dev.2.1 * Cherry-pick 3f32196958970682b1acba6abb73bb891e23709e to dev * Cherry-pick f9cedb68137655fddaa7f345578fbe97729f5012 to dev * Cherry-pick 8023accf3f16740e91bd53c5402aafbc4d209352 to dev * Cherry-pick 1392d61c9be32f247bd7bd3180e0858cbaca3d7e to dev
diff --git a/CHANGELOG.md b/CHANGELOG.md index eb17626..367fbca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -1,43 +1,4 @@ -## Next release -(Add new changes here, and they will be copied to the change section for the - next release) - -### Core libraries - -#### `dart:io` - -* **Breaking change**: Added `IOOverrides.serverSocketBind` to aid in writing - tests that wish to mock `ServerSocket.bind`. - -### Dart VM - -* New fields added to existing instances by a reload will now be initialized -lazily, as if the field was a late field. This makes the initialization order -program-defined, whereas previously it was undefined. - -### Tools - -#### Linter - -The Linter was updated to `0.1.103`, which includes: - -* updates to `prefer_relative_imports` to use a faster and more robust way to check for self-package references -* updates to our approach to checking for `lib` dir contents (speeding up `avoid_renaming_method_parameters` and - making `prefer_relative_imports` and `public_member_api_docs` amenable to internal package formats -- w/o pubspecs) - -#### Pub - -* `pub get` generates [`.dart_tools/package_config.json`](https://github.com/dart-lang/language/blob/62c036cc41b10fb543102d2f73ee132d1e2b2a0e/accepted/future-releases/language-versioning/package-config-file-v2.md) - in addition to `.packages` to support language versioning. - -* `pub publish` now warns about the old flutter plugin registration format. - -* `pub publish` now warns about the `author` field in pubspec.yaml being. - obsolete. - -* Show a proper error message when `git` is not installed. - -## 2.6.0 - 2019-11-05 +## 2.7.0 - 2019-12-11 ### Language @@ -2447,7 +2408,7 @@ * `dart:web_audio` - * new method on `AudioContext` – `createIirFilter` returns a new class + * new method on `AudioContext` – `createIirFilter` returns a new class `IirFilterNode`. * `dart:web_gl`
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect index 2b10843..0b6ab81 100644 --- a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
@@ -10,7 +10,7 @@ @#C3 class Coordinate extends ffi::Struct { @#C3 - static final field core::int* #sizeOf = (#C6).{core::List::[]}(ffi::_abi())/* from null */; + static final field core::int* #sizeOf = (#C6).{core::List::[]}(ffi::_abi()); @#C3 constructor #fromPointer(dynamic #pointer) → dynamic : super ffi::Struct::_fromPointer(#pointer)
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart index 9861852..e7da53d 100644 --- a/pkg/vm/lib/transformations/ffi_definitions.dart +++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -217,7 +217,9 @@ name: Name("#fromPointer"), initializers: [ SuperInitializer(structFromPointer, Arguments([VariableGet(pointer)])) - ]); + ], + fileUri: node.fileUri) + ..fileOffset = node.fileOffset; _makeEntryPoint(ctor); node.addMember(ctor); } @@ -378,7 +380,9 @@ isStatic: true, isFinal: true, initializer: _runtimeBranchOnLayout(sizes), - type: InterfaceType(intClass, Nullability.legacy)); + type: InterfaceType(intClass, Nullability.legacy), + fileUri: struct.fileUri) + ..fileOffset = struct.fileOffset; _makeEntryPoint(sizeOf); struct.addMember(sizeOf); }
diff --git a/pkg/vm/lib/transformations/ffi_use_sites.dart b/pkg/vm/lib/transformations/ffi_use_sites.dart index 9e3ba3ed..5568750 100644 --- a/pkg/vm/lib/transformations/ffi_use_sites.dart +++ b/pkg/vm/lib/transformations/ffi_use_sites.dart
@@ -297,7 +297,9 @@ nativeFunctionType ])), isStatic: true, - isFinal: true); + isFinal: true, + fileUri: currentLibrary.fileUri) + ..fileOffset = node.fileOffset; currentLibrary.addMember(field); return StaticGet(field); }
diff --git a/runtime/vm/dwarf.cc b/runtime/vm/dwarf.cc index cd5530d..2093b90 100644 --- a/runtime/vm/dwarf.cc +++ b/runtime/vm/dwarf.cc
@@ -634,6 +634,7 @@ for (intptr_t i = 0; i < scripts_.length(); i++) { const Script& script = *(scripts_[i]); uri = script.url(); + RELEASE_ASSERT(strlen(uri.ToCString()) != 0); string(uri.ToCString()); // NOLINT uleb128(0); // Include directory index. uleb128(0); // File modification time.
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart index a1b410c..23b2a9a 100644 --- a/sdk/lib/core/errors.dart +++ b/sdk/lib/core/errors.dart
@@ -590,6 +590,18 @@ } /** - * Error thrown when a late field is set or get when it shouldn't be. + * Error thrown when a late variable is accessed in an invalid manner. + * + * A late variable must be initialized before it's read. + * If a late variable has no initializer expression and has not + * been written to, then reading it will throw a + * late initialization error. + * + * A late final variable with no initializer expression may only + * be written to once. + * If it is written to again, the writing will throw a + * late initialization error. */ -class LateInitializationError extends Error {} +abstract class LateInitializationError extends Error { + factory LateInitializationError._() => throw UnsupportedError(""); +}
diff --git a/sdk_nnbd/lib/core/errors.dart b/sdk_nnbd/lib/core/errors.dart index 46b852a..58ca190 100644 --- a/sdk_nnbd/lib/core/errors.dart +++ b/sdk_nnbd/lib/core/errors.dart
@@ -592,6 +592,18 @@ } /** - * Error thrown when a late field is set or get when it shouldn't be. + * Error thrown when a late variable is accessed in an invalid manner. + * + * A late variable must be initialized before it's read. + * If a late variable has no initializer expression and has not + * been written to, then reading it will throw a + * late initialization error. + * + * A late final variable with no initializer expression may only + * be written to once. + * If it is written to again, the writing will throw a + * late initialization error. */ -class LateInitializationError extends Error {} +abstract class LateInitializationError extends Error { + factory LateInitializationError._() => throw UnsupportedError(""); +}
diff --git a/tools/VERSION b/tools/VERSION index 20a401d..3e2749c 100644 --- a/tools/VERSION +++ b/tools/VERSION
@@ -34,6 +34,6 @@ MINOR 7 PATCH 0 PRERELEASE 2 -PRERELEASE_PATCH 0 +PRERELEASE_PATCH 1 ABI_VERSION 24 OLDEST_SUPPORTED_ABI_VERSION 23
diff --git a/tools/make_version.py b/tools/make_version.py index 70f2900..4b16d91 100755 --- a/tools/make_version.py +++ b/tools/make_version.py
@@ -47,6 +47,18 @@ def MakeVersionString(quiet, no_git_hash, custom_for_pub=None): channel = utils.GetChannel() + if custom_for_pub: + # TODO(athom): remove the custom 2.7.0 logic post release. + # For 2.7.0, we want flutter to claim Dart is 2.7.0 even before it is + # decided what exactly 2.7.0 will be. Dart & Flutter stable releases + # will be synced, so that what will be released as Dart 2.7.0 will also + # be what will be packaged with Flutter. + version = utils.ReadVersionFile() + custom_version_string = "%s.%s.%s" % (version.major, version.minor, + version.patch) + if custom_version_string == "2.7.0" and custom_for_pub == "flutter": + return "2.7.0" + if custom_for_pub and channel == 'be': latest = utils.GetLatestDevTag() if not latest: @@ -57,16 +69,6 @@ else: git_hash = utils.GetShortGitHash() version_string = ("%s.%s-%s" % (latest, custom_for_pub, git_hash)) - # TODO(athom): remove the custom 2.7.0 logic post release. - # For 2.7.0, we want flutter to claim Dart is 2.7.0 even before it is - # decided what exactly 2.7.0 will be. Dart & Flutter stable releases - # will be synced, so that what will be released as Dart 2.7.0 will also - # be what will be packaged with Flutter. - version = utils.ReadVersionFile() - custom_version_string = "%s.%s.%s" % (version.major, version.minor, version.patch) - if custom_version_string == "2.7.0" and custom_for_pub == "flutter": - version_string = "2.7.0" - else: version_string = utils.GetSemanticSDKVersion(no_git_hash=no_git_hash) if not quiet: