@@ -104,7 +104,7 @@ significant changes across all areas of the platform. Large changes include:
104
104
}
105
105
```
106
106
107
- * Bounds on generic functions are invariant The following program now issues
107
+ * Bounds on generic functions are invariant. The following program now issues
108
108
an invalid override error ([issue 29014][sdk#29014]):
109
109
110
110
```dart
@@ -391,7 +391,7 @@ Still need entries for all changes to dart:html since 1.x
391
391
null, which is a value that was always possible for it to return previously.
392
392
* Deprecated `packageRoot` parameter in `Isolate.spawnUri`, which is was
393
393
previously used only for `packages/` directory resolution. That style of
394
- resolution is no longer supported in dart 2.
394
+ resolution is no longer supported in Dart 2.
395
395
396
396
<!--
397
397
Still need entries for all changes to dart:js since 1.x
@@ -406,8 +406,9 @@ Still need entries for all changes to dart:js since 1.x
406
406
407
407
* Added `IsolateMirror.loadUri`, which allows dynamically loading additional
408
408
code.
409
- * Marked `MirrorsUsed` as deprecated. The mirrors library is no longer
410
- supported by dart2js, and `MirrorsUsed` only affected dart2js.
409
+ * Marked `MirrorsUsed` as deprecated. The `MirrorsUsed` annotation was only
410
+ used to inform the dart2js compiler about how mirrors were used, but dart2js
411
+ no longer supports the mirrors library altogether.
411
412
412
413
<!--
413
414
Still need entries for all changes to dart:svg since 1.x
@@ -435,13 +436,13 @@ Still need entries for all changes to dart:web_audio,web_gl,web_sql since 1.x
435
436
https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md
436
437
for details.
437
438
438
- * The dart VM no longer attempts to perform `packages/` directory resolution
439
+ * The Dart VM no longer attempts to perform `packages/` directory resolution
439
440
(for loading scripts, and in `Isolate.resolveUri`). Users relying on
440
441
`packages/` directories should switch to `.packages` files.
441
442
442
443
### Dart for the Web
443
444
444
- * Expose Javascript Promise APIs using Dart futures. For example,
445
+ * Expose JavaScript Promise APIs using Dart futures. For example,
445
446
`BackgroundFetchManager.get` is defined as:
446
447
447
448
```dart
@@ -481,60 +482,35 @@ Still need entries for all changes to dart:web_audio,web_gl,web_sql since 1.x
481
482
482
483
#### dart2js
483
484
484
- * The dart2js compiler now uses the common front-end by default. This is a
485
- step towards supporting Dart 2.0. At this time dart2js has no semantic
486
- changes: the Dart 2.0 strong-mode semantics are not enabled, so dart2js
487
- continues to support the Dart 1 type system. This change however lets us
488
- start supporting new syntactic features of Dart 2.0, like optional
489
- new/const. With this change you may notice:
485
+ * dart2js now compiles programs with Dart 2.0 semantics. Apps are expected to
486
+ be bigger than before, because Dart 2.0 has many more implicit checks
487
+ (similar to the `--checked` flag in Dart 1.0).
490
488
491
- * Small code differences (~1% code size): some code is generated slightly
492
- different, this is expected because the internal representation of the
493
- program has small differences between the old and new front end.
489
+ We exposed a `--omit-implicit-checks` flag which removes most of the extra
490
+ implicit checks. Only use this if you have enough test coverage to know that
491
+ the app will work well without the checks. If a check would have failed and
492
+ it is omitted, your app may crash or behave in unexpected ways. This flag is
493
+ similar to `--trust-type-annotations` in Dart 1.0.
494
494
495
- * Source-maps changes: with the new front-end, dart2js also is using a new
496
- mechanism to generate source-map files. We don't expect big differences
497
- here either, the new source-maps try to encode more data for locations
498
- that are commonly used during debugging.
495
+ * dart2js replaced its front-end with the common front-end (CFE). Thanks to
496
+ the CFE, dart2js errors are more consistent with all other Dart tools.
499
497
500
- * Some missing errors: the CFE is not complete and may not report some
501
- static errors that the old front-end did. This is temporary. If you run
502
- the analyzer on all your project already, you may never notice those
503
- missing error messages.
498
+ * dart2js replaced its source-map implementation. There aren't any big
499
+ differences, but more data is emitted for synthetic code generated by the
500
+ compiler.
504
501
505
- * As announced earlier, this is the first version of dart2js that no
506
- longer supports `dart:mirrors`.
502
+ * `dart:mirrors` support was removed. Frameworks are encouraged to use
503
+ code-generation instead. Conditional imports indicate that mirrors are not
504
+ supported, and any API in the mirrors library will throw at runtime.
507
505
508
- * This is the first version of dart2js that no longer supports
509
- `--package-root`, which long ago was deprecated in favor of
510
- `--packages`.
506
+ * The generated output of dart2js can now be run as webworker.
511
507
512
- * Fixed `--no-frequency-based-minification`, which was not working together
513
- with the common front-end ([issue 32600][sdk#32600]).
514
-
515
- * Support `--categories=Server` with the common front-end. This included also
516
- fixes for the constant value `bool.fromEnvironment("*")` of
517
- "dart.libraries.io", "dart.libraries.mirrors", "dart.libraries.isolate", and
518
- "dart.libraries.html".
519
-
520
- * Several fixes to improve support for running output of dart2js as a
521
- webworker.
522
-
523
- * `dart:isolate` implementation removed. To launch background tasks, please
508
+ * `dart:isolate` support was removed. To launch background tasks, please
524
509
use webworkers instead. APIs for webworkers can be accessed from `dart:html`
525
510
or JS-interop.
526
511
527
- * Dart2js now compiles programs by default with Dart 2.0 semantics. Apps are
528
- expected to be bigger than before, because Dart 2.0 has many more implicit
529
- checks (similar to the `--checked` flag in Dart 1.0).
530
-
531
- * Add `--omit-implicit-checks` which removes most of the extra implicit
532
- checks. Only use this if you have enough test coverage to know that the app
533
- will work well without the checks. If a check would have failed and it is
534
- omitted, your app may crash or behave in unexpected ways.
535
-
536
- [sdk#32561]: https://github.com/dart-lang/sdk/issues/32561
537
- [sdk#32600]: https://github.com/dart-lang/sdk/issues/32600
512
+ * dart2js no longer supports the `--package-root` flag. This flag was
513
+ deprecated in favor of `--packages` long ago.
538
514
539
515
### Tool Changes
540
516
0 commit comments