Strong mode changelog updates for 1.23.0

Update changelog for down cast composite changes, and new mixin
restriction.  Also move Strong Mode section underneath Language.

BUG=
R=kevmoo@google.com

Review-Url: https://codereview.chromium.org/2788703002 .
This commit is contained in:
Leaf Petersen 2017-03-30 14:22:19 -07:00
parent bc923bed16
commit d9e7a36616

View file

@ -2,6 +2,8 @@
### Language
#### Strong Mode
### Core library changes
* `dart:io`
@ -9,8 +11,6 @@
### Dart VM
### Strong Mode
### Tool Changes
## 1.23.0
@ -23,32 +23,43 @@
This allows libraries with no library declarations (and therefore no name)
to have parts, and it allows tools to easily find the library of a part file.
### Core library changes
#### Strong Mode
* `dart:core`
* Added `Uri.isScheme` function to check the scheme of a URI.
Example: `uri.isScheme("http")`. Ignores case when comparing.
* Make `UriData.parse` validate its input better.
If the data is base-64 encoded, the data is normalized wrt.
alphabet and padding, and it contains invalid base-64 data,
parsing fails. Also normalizes non-base-64 data.
* `dart:io`
* Added functions `File.lastAccessed`, `File.lastAccessedSync`,
`File.setLastModified`, `File.setLastModifiedSync`, `File.setLastAccessed`,
and `File.setLastAccessedSync`.
* Added `{Stdin,Stdout}.supportsAnsiEscapes`.
* Breaking change - it is now a strong mode error if a mixin causes a name
conflict between two private members (field/getter/setter/method) from a
different library. (SDK
issue [28809](https://github.com/dart-lang/sdk/issues/28809)).
### Dart VM
lib1.dart:
* Calls to `print()` and `Stdout.write*()` now correctly print unicode
characters to the console on Windows. Calls to `Stdout.add*()` behave as
before.
### Strong Mode
```dart
class A {
int _x;
}
* Strong mode will prefer the expected type to infer generic types,
functions, and methods
(SDK issue [27586](https://github.com/dart-lang/sdk/issues/27586)).
class B {
int _x;
}
```
lib2.dart:
```dart
import 'lib1.dart';
class C extends A with B {}
```
```
error • The private name _x, defined by B, conflicts with the same name defined by A at tmp/lib2.dart:3:24 • private_collision_in_mixin_application
```
* Breaking change - strong mode will prefer the expected type to infer generic
types, functions, and methods (SDK
issue [27586](https://github.com/dart-lang/sdk/issues/27586)).
```dart
main() {
@ -94,6 +105,49 @@
}
```
* Strong mode down cast composite warnings are no longer issued by default.
(SDK issue [28588](https://github.com/dart-lang/sdk/issues/28588)).
```dart
void test() {
List untyped = [];
List<int> typed = untyped; // No down cast composite warning
}
```
To opt back into the warnings, add the following to
the
[.analysis_options](https://www.dartlang.org/guides/language/analysis-options)
file for your project.
```
analyzer:
errors:
strong_mode_down_cast_composite: warning
```
### Core library changes
* `dart:core`
* Added `Uri.isScheme` function to check the scheme of a URI.
Example: `uri.isScheme("http")`. Ignores case when comparing.
* Make `UriData.parse` validate its input better.
If the data is base-64 encoded, the data is normalized wrt.
alphabet and padding, and it contains invalid base-64 data,
parsing fails. Also normalizes non-base-64 data.
* `dart:io`
* Added functions `File.lastAccessed`, `File.lastAccessedSync`,
`File.setLastModified`, `File.setLastModifiedSync`, `File.setLastAccessed`,
and `File.setLastAccessedSync`.
* Added `{Stdin,Stdout}.supportsAnsiEscapes`.
### Dart VM
* Calls to `print()` and `Stdout.write*()` now correctly print unicode
characters to the console on Windows. Calls to `Stdout.add*()` behave as
before.
### Tool changes
* Analysis