Version 2.1.1
Merge commit '2.1.1-dev.3.2' into stable
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9db2340..43f645a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,53 +1,70 @@
-## 2.1.1-dev.3.2
+## 2.1.1 - 2019-02-18
-* Cherry-pick 9d25cc93e850d4717cdc9e1c4bd3623e09c16d47 to dev
+This is a minor version release. Again, the team's focus was mostly on improving
+performance and stability after the large changes in Dart 2.0.0. In particular,
+dart2js now always uses the "fast startup" emitter and the old emitter has been
+removed.
-## 2.1.1-dev.3.1
+There are a couple of very minor **breaking changes:**
-* Cherry-pick 46080dd886a622c5520895d49c97506ecedb1df8 to dev
-* Cherry-pick fc62cf037343248c5ace87629d8eb1063f9f2428 to dev
-* Cherry-pick 770ab5275ac34af62d7c39da8eac8c56fdc48edb to dev
-* Cherry-pick 957e194735bda4fcf06cdcc68fa80f3290b17d79 to dev
+* In `dart:io`, adding to a closed `IOSink` now throws a `StateError`.
-## 2.1.1-dev.3.0
+* On the Dart VM, a soundness hole when using `dart:mirrors` to reflectively
+ invoke a method in an incorrect way that violates its static types has
+ been fixed (Issue [35611][]).
-* Cherry-pick 3cb16d20e7810a2a378bb897d939f67c0b380d88 to dev
+### Language
-## 2.1.1-dev.2.0
+This release has no language changes.
-### Core library changes
+### Core library
#### `dart:core`
* Made `DateTime.parse()` also recognize `,` as a valid decimal separator
- when parsing from a string. (Issue [35576][])
+ when parsing from a string (Issue [35576][]).
[35576]: https://github.com/dart-lang/sdk/issues/35576
-### Tool Changes
+#### `dart:html`
-#### Analyzer
+* Added methods `Element.removeAttribute`, `Element.removeAttributeNS`,
+ `Element.hasAttribute` and `Element.hasAttributeNS`. (Issue [35655][]).
+* Improved dart2js compilation of `element.attributes.remove(name)` to
+ generate `element.removeAttribute(name)`, so that there is no performance
+ reason to migrate to the above methods.
+* Fixed a number of `dart:html` bugs:
-* New hints added:
+ * Fixed HTML API's with callback typedef to correctly convert Dart
+ functions to JS functions (Issue [35484]).
+ * HttpStatus constants exposed in `dart:html` (Issue [34318]).
+ * Expose DomName `ondblclick` and `dblclickEvent` for Angular analyzer.
+ * Fixed `removeAll` on `classes`; `elements` parameter should be
+ `Iterable<Object>` to match Set's `removeAll` not `Iterable<E>` (Issue
+ [30278]).
+ * Fixed a number of methods on DataTransferItem, Entry, FileEntry and
+ DirectoryEntry which previously returned NativeJavaScriptObject. This
+ fixes handling drag/drop of files/directories (Issue [35510]).
+ * Added ability to allow local file access from Chrome browser in ddb.
- * `NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR` and
- `NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW` when a `@literal`
- const constructor is called in a non-const context (or with `new`).
+[35655]: https://github.com/dart-lang/sdk/issues/35655
+[30278]: https://github.com/dart-lang/sdk/issues/30278
+[34318]: https://github.com/dart-lang/sdk/issues/34318
+[35484]: https://github.com/dart-lang/sdk/issues/35484
+[35510]: https://github.com/dart-lang/sdk/issues/35510
-#### dart2js
+#### `dart:io`
-* `--fast-startup` is forced on. The flag is silently ignored and will be
- deprecated and then removed at a later date.
+* **Breaking Change:** Adding to a closed `IOSink` now throws a `StateError`.
+* Added ability to get and set low level socket options.
- The alternative 'full emitter' is no longer available. The generated code for
- `--fast-startup` is optimized to load faster, even though it can be slightly
- larger.
-
-## 2.1.1-dev.1.0
+[29554]: https://github.com/dart-lang/sdk/issues/29554
### Dart VM
-In previous releases it was possible to violate static types using dart:mirrors but this bug is fixed now. Meaning that the code below would run without any TypeErrors and print "impossible" output.
+In previous releases it was possible to violate static types using
+`dart:mirrors`. This code would run without any TypeErrors and print
+"impossible" output:
```dart
import 'dart:mirrors';
@@ -66,11 +83,89 @@
}
```
-Only code that already violates static typing will break.
+This bug is fixed now. Only code that already violates static typing will break.
+See Issue [35611][] for more details.
-See Issue [#35611](https://github.com/dart-lang/sdk/issues/35611) for more details.
+[35611]: https://github.com/dart-lang/sdk/issues/35611
-### Tool Changes
+### Dart for the Web
+
+#### dart2js
+
+* The old "full emitter" back-end is removed and dart2js always uses the "fast
+ startup" back-end. The generated fast startup code is optimized to load
+ faster, even though it can be slightly larger. The `--fast-startup` and
+ `--no-fast-startup` are allowed but ignored. They will be removed in a
+ future version.
+
+* We fixed a bug in how deferred constructor calls were incorrectly not marked
+ as deferred. The old behavior didn't cause breakages, but was imprecise and
+ pushed more code to the main output unit.
+
+* A new deferred split algorithm implementation was added.
+
+ This implementation fixes a soundness bug and addresses performance issues
+ of the previous implementation, because of that it can have a visible impact
+ on apps. In particular:
+
+ * We fixed a performance issue which was introduced when we migrated to
+ the common front-end. On large apps, the fix can cut 2/3 of the time
+ spent on this task.
+
+ * We fixed a bug in how inferred types were categorized (Issue [35311][]).
+ The old behavior was unsound and could produce broken programs. The fix
+ may cause more code to be pulled into the main output unit.
+
+ This shows up frequently when returning deferred values from closures
+ since the closure's inferred return type is the deferred type. For
+ example, if you have:
+
+ ```dart
+ () async {
+ await deferred_prefix.loadLibrary();
+ return new deferred_prefix.Foo();
+ }
+ ```
+
+ The closure's return type is `Future<Foo>`. The old implementation
+ defers `Foo`, and incorrectly makes the return type `Future<dynamic>`.
+ This may break in places where the correct type is expected.
+
+ The new implementation will not defer `Foo`, and will place it in the
+ main output unit. If your intent is to defer it, then you need to ensure
+ the return type is not inferred to be `Foo`. For example, you can do so
+ by changing the code to a named closure with a declared type, or by
+ ensuring that the return expression has the type you want, like:
+
+ ```dart
+ () async {
+ await deferred_prefix.loadLibrary();
+ return new deferred_prefix.Foo() as dynamic;
+ }
+ ```
+
+ Because the new implementation might require you to inspect and fix your
+ app, we exposed two temporary flags:
+
+ * The `--report-invalid-deferred-types` causes dart2js to run both the
+ old and new algorithms and report any cases where an invalid type was
+ detected.
+
+ * The `--new-deferred-split` flag enables this new algorithm.
+
+* The `--categories=*` flag is being replaced. `--categories=all` was only
+ used for testing and it is no longer supported. `--categories=Server`
+ continues to work at this time but it is deprecated, please use
+ `--server-mode` instead.
+
+* The `--library-root` flag was replaced by `--libraries-spec`. This flag is
+ rarely used by developers invoking dart2js directly. It's important for
+ integrating dart2js with build systems. See `--help` for more details on the
+ new flag.
+
+[35311]: https://github.com/dart-lang/sdk/issues/35311
+
+### Tools
#### Analyzer
@@ -81,134 +176,39 @@
* New hints added:
- * `INVALID_LITERAL_ANNOTATION` when something other than a const
+ * `NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR` and
+ `NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW` inform you when a
+ `@literal` const constructor is called in a non-const context (or with
+ `new`).
+ * `INVALID_LITERAL_ANNOTATION` reports when something other than a const
constructor is annotated with `@literal`.
- * `SUBTYPE_OF_SEALED_CLASS` when any class or mixin subclasses (extends,
- implements, mixes in, or constrains to) a `@sealed` class, and the two
- are declared in different packages.
- * `MIXIN_ON_SEALED_CLASS` when a `@sealed` class is used as a superclass
- constraint of a mixin.
-
-#### dart2js
-
-* We fixed a bug in how deferred constructor calls were incorrectly not
- marked as deferred. The old behavior didn't cause breakages, but was imprecise
- and pushed more code to the main output unit.
-
-* A new deferred split algorithm implementation was added.
-
- This implementation fixes a soundness bug and addresses performance issues of
- the previous implementation, because of that it can have a visible impact
- on apps. In particular,
-
- * We fixed a performance issue which was introduced when we migrated to the
- Common front-end. On large apps, the fix can cut down 2/3 of the time
- spent on this task.
-
- * We fixed a bug in how inferred types were miscategorized (#35311). The old
- behavior was unsound and could produce broken programs. The fix may cause
- more code to be pulled into the main output unit.
-
- This shows up frequently when returning deferred values from closures
- since the closure's inferred return type is the deferred type.
- For example, if you have:
-
- ```dart
- () async {
- await deferred_prefix.loadLibrary();
- return new deferred_prefix.Foo();
- }
- ```
-
- The closure's return type is `Future<Foo>`. The old implementation defers
- `Foo`, and incorrectly makes the return type `Future<dynamic>`. This may
- break in places where the correct type is expected.
-
- The new implementation will not defer `Foo`, and will place it in the main
- output unit. If your intent is to defer it, then you need to ensure the
- return type is not inferred to be `Foo`. For example, you can do so by
- changing the code to a named closure with a declared type, or by ensuring
- that the return expression has the type you want, like:
-
- ```dart
- () async {
- await deferred_prefix.loadLibrary();
- return new deferred_prefix.Foo() as dynamic;
- }
- ```
-
- * Because the new implementation might require you to inspect and fix
- your app, we exposed two temporary flags:
-
- * `--report-invalid-deferred-types`: when provided, we will run
- both the old and new algorithm and report where the issue was
- detected.
-
- * `--new-deferred-split`: enables the new algorithm.
+ * `SUBTYPE_OF_SEALED_CLASS` reports when any class or mixin subclasses
+ (extends, implements, mixes in, or constrains to) a `@sealed` class, and
+ the two are declared in different packages.
+ * `MIXIN_ON_SEALED_CLASS` reports when a `@sealed` class is used as a
+ superclass constraint of a mixin.
#### dartdoc
-* dartdoc default styles now work much better on mobile. Simple browsing
- and searching of API docs now work in many cases.
+Default styles now work much better on mobile. Simple browsing and searching of
+API docs now work in many cases.
-#### Linter
+Upgraded the linter to `0.1.78` which adds the following improvements:
-The linter was bumped to `0.1.78` which introduces the following linter fixes to the SDK:
-
-* fixed `type_annotate_public_apis` false positives on local functions
-* fixed `avoid_shadowing_type_parameters` to report shadowed type parameters in generic typedefs
-* fixed `use_setters_to_change_properties` to not wrongly lint overriding methods
-* fixed `cascade_invocations` to not lint awaited targets
-* fixed `prefer_conditional_assignment` false positives
-* fixed `join_return_with_assignment` false positives
-* fixed `cascade_invocations` false positives
-* miscellaneous documentation improvements
-* updated `invariant_booleans` status to experimental
-
-and adds:
-
-* a new `prefer_final_in_for_each` lint rule to flag loop variables that could be declared final
-
-## 2.1.1-dev.0.1
-
-* Cherry-pick 4914fe57ea9e034b948ef3ab5a4e7e511991f845 to dev
-* Cherry-pick 5a8ec419829337b60d705cabe0b3b1ab5d0d0883 to dev
-
-## 2.1.1-dev.0.0
-
-* Cherry-pick f8a680e5116493f8795c148a52dbecf8a84e4536 to dev
-* Cherry-pick b1c963c84b20e715bc5c1f7d443168071c2b971d to dev
-
-## 2.2.0-dev.1.1
-
-### Tool Changes
-
-#### Linter
-
-The linter was bumped to `0.1.73` which introduces the following new lints to the SDK:
-
-* `unnecessary_await_in_return`
-* `use_function_type_syntax_for_parameters`
-* `avoid_returning_null_for_future`
-* `avoid_shadowing_type_parameters`
-
-In addition, `prefer_bool_in_asserts` has been deprecated as its semantics are
-redundant with Dart 2 checks.
-
-## 2.2.0-dev.0.0
-
-### Dart for the Web
-
-#### dart2js
-
-* The `--categories=*` flag is being replaced. `--categories=all` was only used
- for testing and it is no longer supported. `--categories=Server` continues to
- work at this time but it is deprecated, please use `--server-mode` instead.
-
-* The `--library-root` flag was replaced by `--libraries-spec`. This flag is
- rarely used by developers invoking dart2js directly. It's important for
- integrating dart2js with build systems. See `--help` for more details on the
- new flag.
+* Added `prefer_final_in_for_each`, `unnecessary_await_in_return`,
+ `use_function_type_syntax_for_parameters`,
+ `avoid_returning_null_for_future`, and `avoid_shadowing_type_parameters`.
+* Updated `invariant_booleans` status to experimental.
+* Fixed `type_annotate_public_apis` false positives on local functions.
+* Fixed `avoid_shadowing_type_parameters` to report shadowed type parameters
+ in generic typedefs.
+* Fixed `use_setters_to_change_properties` to not wrongly lint overriding
+ methods.
+* Fixed `cascade_invocations` to not lint awaited targets.
+* Fixed `prefer_conditional_assignment` false positives.
+* Fixed `join_return_with_assignment` false positives.
+* Fixed `cascade_invocations` false positives.
+* Deprecated `prefer_bool_in_asserts` as it is redundant in Dart 2.
## 2.1.0 - 2018-11-15
diff --git a/tools/VERSION b/tools/VERSION
index 5034ac4..9a869d4 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -23,9 +23,9 @@
# * Making cherry-picks to stable channel
# - increase PATCH by 1
#
-CHANNEL dev
+CHANNEL stable
MAJOR 2
MINOR 1
PATCH 1
-PRERELEASE 3
-PRERELEASE_PATCH 2
+PRERELEASE 0
+PRERELEASE_PATCH 0