Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: CHANGELOG.md

Issue 2788703002: Strong mode changelog updates for 1.23.0 (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ## 1.24.0 1 ## 1.24.0
2 2
3 ### Language 3 ### Language
4 4
5 #### Strong Mode
6
5 ### Core library changes 7 ### Core library changes
6 8
7 ### Dart VM 9 ### Dart VM
8 10
9 ### Strong Mode
10
11 ### Tool Changes 11 ### Tool Changes
12 12
13 ## 1.23.0 13 ## 1.23.0
14 14
15 ### Language 15 ### Language
16 * Allow using URI strings in `part of` declarations to refer to the 16 * Allow using URI strings in `part of` declarations to refer to the
17 importing library. 17 importing library.
18 A library part now can declare its library either as: 18 A library part now can declare its library either as:
19 `part of name.of.library;` or as `part of "uriReferenceOfLibrary.dart";`. 19 `part of name.of.library;` or as `part of "uriReferenceOfLibrary.dart";`.
20 This allows libraries with no library declarations (and therefore no name) 20 This allows libraries with no library declarations (and therefore no name)
21 to have parts, and it allows tools to easily find the library of a part file. 21 to have parts, and it allows tools to easily find the library of a part file.
22 22
23 ### Core library changes 23 #### Strong Mode
24 24
25 * `dart:core` 25 * Breaking change - it is now a strong mode error if a mixin causes a name
26 * Added `Uri.isScheme` function to check the scheme of a URI. 26 conflict between two private members (field/getter/setter/method) from a
27 Example: `uri.isScheme("http")`. Ignores case when comparing. 27 different library. (SDK
28 * Make `UriData.parse` validate its input better. 28 issue [28809](https://github.com/dart-lang/sdk/issues/28809)).
29 If the data is base-64 encoded, the data is normalized wrt.
30 alphabet and padding, and it contains invalid base-64 data,
31 parsing fails. Also normalizes non-base-64 data.
32 * `dart:io`
33 * Added functions `File.lastAccessed`, `File.lastAccessedSync`,
34 `File.setLastModified`, `File.setLastModifiedSync`, `File.setLastAccessed`,
35 and `File.setLastAccessedSync`.
36 * Added `{Stdin,Stdout}.supportsAnsiEscapes`.
37 29
38 ### Dart VM 30 lib1.dart:
39 31
40 * Calls to `print()` and `Stdout.write*()` now correctly print unicode
41 characters to the console on Windows. Calls to `Stdout.add*()` behave as
42 before.
43 32
44 ### Strong Mode 33 ```dart
34 class A {
35 int _x;
36 }
45 37
46 * Strong mode will prefer the expected type to infer generic types, 38 class B {
47 functions, and methods 39 int _x;
48 (SDK issue [27586](https://github.com/dart-lang/sdk/issues/27586)). 40 }
41 ```
42
43 lib2.dart:
44
45
46 ```dart
47 import 'lib1.dart';
48
49 class C extends A with B {}
50 ```
51
52 ```
53 error • The private name _x, defined by B, conflicts with the same name defi ned by A at tmp/lib2.dart:3:24 • private_collision_in_mixin_application
54 ```
55
56
57 * Breaking change - strong mode will prefer the expected type to infer generic
58 types, functions, and methods (SDK
59 issue [27586](https://github.com/dart-lang/sdk/issues/27586)).
49 60
50 ```dart 61 ```dart
51 main() { 62 main() {
52 List<Object> foo = /*infers: <Object>*/['hello', 'world']; 63 List<Object> foo = /*infers: <Object>*/['hello', 'world'];
53 var bar = /*infers: <String>*/['hello', 'world']; 64 var bar = /*infers: <String>*/['hello', 'world'];
54 } 65 }
55 ``` 66 ```
56 67
57 * Strong mode inference error messages are improved 68 * Strong mode inference error messages are improved
58 (SDK issue [29108](https://github.com/dart-lang/sdk/issues/29108)). 69 (SDK issue [29108](https://github.com/dart-lang/sdk/issues/29108)).
(...skipping 25 matching lines...) Expand all
84 class D extends C { 95 class D extends C {
85 int x = 123; 96 int x = 123;
86 get y => super.x; 97 get y => super.x;
87 } 98 }
88 main() { 99 main() {
89 print(new D().x); 100 print(new D().x);
90 print(new D().y); 101 print(new D().y);
91 } 102 }
92 ``` 103 ```
93 104
105 * Strong mode down cast composite warnings are no longer issued by default.
106 (SDK issue [28588](https://github.com/dart-lang/sdk/issues/28588)).
107
108 ```dart
109 void test() {
110 List untyped = [];
111 List<int> typed = untyped; // No down cast composite warning
112 }
113 ```
114
115 To opt back into the warnings, add the following to
116 the
117 [.analysis_options](https://www.dartlang.org/guides/language/analysis-options)
118 file for your project.
119
120 ```
121 analyzer:
122 errors:
123 strong_mode_down_cast_composite: warning
124 ```
125
126
127 ### Core library changes
128
129 * `dart:core`
130 * Added `Uri.isScheme` function to check the scheme of a URI.
131 Example: `uri.isScheme("http")`. Ignores case when comparing.
132 * Make `UriData.parse` validate its input better.
133 If the data is base-64 encoded, the data is normalized wrt.
134 alphabet and padding, and it contains invalid base-64 data,
135 parsing fails. Also normalizes non-base-64 data.
136 * `dart:io`
137 * Added functions `File.lastAccessed`, `File.lastAccessedSync`,
138 `File.setLastModified`, `File.setLastModifiedSync`, `File.setLastAccessed`,
139 and `File.setLastAccessedSync`.
140 * Added `{Stdin,Stdout}.supportsAnsiEscapes`.
141
142 ### Dart VM
143
144 * Calls to `print()` and `Stdout.write*()` now correctly print unicode
145 characters to the console on Windows. Calls to `Stdout.add*()` behave as
146 before.
147
94 ### Tool changes 148 ### Tool changes
95 149
96 * Analysis 150 * Analysis
97 * `dartanalyzer` now follows the same rules as the analysis server to find 151 * `dartanalyzer` now follows the same rules as the analysis server to find
98 an analysis options file, stopping when an analysis options file is found: 152 an analysis options file, stopping when an analysis options file is found:
99 * Search up the directory hierarchy looking for an analysis options file. 153 * Search up the directory hierarchy looking for an analysis options file.
100 * If analyzing a project referencing the [Flutter](https://flutter.io/) 154 * If analyzing a project referencing the [Flutter](https://flutter.io/)
101 package, then use the 155 package, then use the
102 [default Flutter analysis options](https://github.com/flutter/flutter/blob /master/packages/flutter/lib/analysis_options_user.yaml) 156 [default Flutter analysis options](https://github.com/flutter/flutter/blob /master/packages/flutter/lib/analysis_options_user.yaml)
103 found in `package:flutter`. 157 found in `package:flutter`.
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1814 they will keep the Dart process alive until they time out. This fixes the 1868 they will keep the Dart process alive until they time out. This fixes the
1815 handling of persistent connections. Previously, the client would shut down 1869 handling of persistent connections. Previously, the client would shut down
1816 immediately after a request. 1870 immediately after a request.
1817 1871
1818 * **Breaking change:** `HttpServer` no longer compresses all traffic by 1872 * **Breaking change:** `HttpServer` no longer compresses all traffic by
1819 default. The new `autoCompress` property can be set to `true` to re-enable 1873 default. The new `autoCompress` property can be set to `true` to re-enable
1820 compression. 1874 compression.
1821 1875
1822 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument, 1876 * `dart:isolate`: `Isolate.spawnUri` added the optional `packageRoot` argument,
1823 which controls how it resolves `package:` URIs. 1877 which controls how it resolves `package:` URIs.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698