Skip to content

Commit 8c24094

Browse files
[3.2] Update breaking changes page (#5331)
- Moved "not yet released to stable" contents to "released in 3.2" section, and added newer entries from the changelog. - Added 3.3.0 changelog contents to "not yet released in stable" --------- Co-authored-by: Parker Lougheed <parlough@gmail.com>
1 parent 5935120 commit 8c24094

File tree

1 file changed

+93
-22
lines changed

1 file changed

+93
-22
lines changed

src/resources/breaking-changes.md

Lines changed: 93 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,45 @@ To be notified about future breaking changes, join the [Dart announce][] group.
4747

4848
## Not yet released to stable
4949

50+
### Libraries
51+
{: .no_toc}
52+
53+
#### `dart:nativewrappers`
54+
55+
* [Marked classes belonging to `NativeWrapperClass` as `base`][51896] so that
56+
none of their subtypes can be implemented.
57+
58+
#### `dart:typed_data`
59+
60+
* **Deprecated**: [Unmodifiable view classes for typed data][53218].
61+
62+
63+
[51896]: https://github.com/dart-lang/sdk/issues/51896
64+
[53218]: https://github.com/dart-lang/sdk/issues/53218
65+
66+
{% comment %}
67+
Create new section from these headers for each release.
68+
If no changes exist in a section (e.g. Language, `dart:async`, etc.),
69+
don't include the section header.
70+
71+
## Released in x.x.x
72+
73+
### Language
74+
{: .no_toc}
75+
76+
### Libraries
77+
{: .no_toc}
78+
79+
#### (`dart:core`, `package:js`, etc)
80+
81+
### Tools
82+
{: .no_toc}
83+
84+
#### (Dart VM, Pub, Linter, `dart2js`, etc)
85+
{% endcomment %}
86+
87+
## Released in 3.2.0
88+
5089
### Language
5190
{: .no_toc}
5291

@@ -57,6 +96,10 @@ To be notified about future breaking changes, join the [Dart announce][] group.
5796
### Libraries
5897
{: .no_toc}
5998

99+
#### `dart:cli`
100+
101+
* **Experimental** **Deprecated**: [The `waitFor` function.][52121]
102+
60103
#### `dart:convert`
61104

62105
* [Changed return types of `utf8.encode()` and `Utf8Codec.encode()`][52801]
@@ -66,52 +109,80 @@ To be notified about future breaking changes, join the [Dart announce][] group.
66109

67110
* **Deprecated**: The `Service.getIsolateID` method.
68111

112+
#### `dart:ffi`
113+
114+
* [Changed `NativeCallable.nativeFunction` so calls now throw an error if
115+
the receiver is already closed][53311], instead of returning `nullptr`.
116+
69117
#### `dart:io`
70118

71119
* [Eliminated trailing whitespace from HTTP headers][53005].
120+
* [Inserted a space at the fold point of folded header values][53227]
121+
that `HttpClientResponse.headers` and `HttpRequest.headers` return.
72122

73123
#### `dart:js_interop`
74124

75125
* **Experimental** **Removed**: `JSNumber.toDart` in favor of `toDartDouble` and
76126
`toDartInt`.
77127
* **Experimental** **Removed**: `Object.toJS` in favor of `Object.toJSBox.`
128+
* **Experimental**: Restricted external JS interop APIs using `dart:js_interop`
129+
to a set of allowed types.
130+
* **Experimental**: Prohibited use of `isNull` and `isUndefined` on dart2wasm.
131+
* **Experimental**: Changed `typeofEquals` and `instanceof` APIs to both return
132+
bool instead of `JSBoolean`.
133+
Also, `typeofEquals` now takes `String` instead of `JSString`.
134+
* **Experimental**: Changed `JSAny` and `JSObject` types to only implementable,
135+
not extendable, by user `@staticInterop` types.
136+
* **Experimental**: Changed `JSArray.withLength` to take `int` instead of `JSNumber`.
78137

79138
### Tools
80139
{: .no_toc}
81140

82-
#### Dart Dev Compiler (DDC) and Dart2js
141+
#### Development JavaScript compiler (DDC)
142+
143+
* [Added interceptors for JavaScript `Symbol` and `BigInt` types][53106];
144+
they should no longer be used with `package:js` classes.
145+
146+
#### Production JavaScript compiler (dart2js)
83147

84148
* [Added interceptors for JavaScript `Symbol` and `BigInt` types][53106];
85149
they should no longer be used with `package:js` classes.
86150

151+
#### Analyzer
152+
153+
* **Language versioned**: [Private final field promotion][2020] might cause the following
154+
analyzer warnings to trigger on existing code that previously passed analysis:
155+
156+
* [`unnecessary_non_null_assertion`](/tools/diagnostic-messages#unnecessary_non_null_assertion)
157+
* [`invalid_null_aware_operator`](/tools/diagnostic-messages#invalid_null_aware_operator)
158+
* [`unnecessary_cast`](/tools/diagnostic-messages#unnecessary_cast)
159+
160+
```dart
161+
class C {
162+
final num? _x = null;
163+
164+
void test() {
165+
if (_x != null) {
166+
print(_x! * 2); // unnecessary_non_null_assertion
167+
print(_x?.abs()); // invalid_null_aware_operator
168+
}
169+
if (_x is int) {
170+
print((_x as int).bitLength); // unnecessary_cast
171+
}
172+
}
173+
}
174+
```
87175

88176
[53167]: https://github.com/dart-lang/sdk/issues/53167
177+
[52121]: https://github.com/dart-lang/sdk/issues/52121
89178
[52801]: https://github.com/dart-lang/sdk/issues/52801
179+
[53311]: https://github.com/dart-lang/sdk/issues/53311
90180
[53005]: https://github.com/dart-lang/sdk/issues/53005
181+
[53227]: https://github.com/dart-lang/sdk/issues/53227
91182
[53106]: https://github.com/dart-lang/sdk/issues/53106
183+
[2020]: https://github.com/dart-lang/language/issues/2020
92184

93185

94-
{% comment %}
95-
Create new section from these headers for each release.
96-
If no changes exist in a section (e.g. Language, `dart:async`, etc.),
97-
don't include the section header.
98-
99-
## Released in x.x.x
100-
101-
### Language
102-
{: .no_toc}
103-
104-
### Libraries
105-
{: .no_toc}
106-
107-
#### (`dart:core`, `package:js`, etc)
108-
109-
### Tools
110-
{: .no_toc}
111-
112-
#### (Dart VM, Pub, Linter, `dart2js`, etc)
113-
{% endcomment %}
114-
115186
## Released in 3.1.0
116187

117188
### Libraries

0 commit comments

Comments
 (0)