-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[breaking change] Discontinue deprecated core library APIs, part II #49529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@sigmundch is the |
Our dependency is still there, but probably can easily be refactored by updating the dart2js patch files without changing the compiler directly |
If we want to ship For example, if someone installs Dart 3.0, and uses that Dart's FWIW, |
This change is a small incremental step, but should allow us to delete the public NoSuchMethod constructor in dart:core. The change simply creates a private constructor in the dart2js patch file and uses that instead. #49529 Change-Id: I51cb2ec3b7f169a6cb831e753a3e5e9bf0752dbd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260940 Reviewed-by: Stephen Adams <[email protected]> Commit-Queue: Sigmund Cherem <[email protected]>
@srawlins I think that is OK. If a developer wants support for migrating away from discontinued APIs, they can use the 2.19 SDK. |
@sigmundch @kevmoo is the comment above about the |
@mit-mit, can you clarify which comment are you referring to? We landed changes to mark the APIs deprecated in late July. Those haven't been released yet in the stable channel, so it will first get broad visibility with the 2.19 stable release. Given that, we wont be removing it entirely in 2.19, but the release that follows. |
@sigmundch I was looking at an older, stale version, sorry.
sgtm, we'll track that as a 3.0 removal then |
Tested: Standard CQ. Bug: #49529 Change-Id: I329b9940db7309c7e48f17eecd7a66d5b853a484 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271922 Commit-Queue: Siva Annamalai <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
The class may be irrelevant when running normal Dart code, but not when using mirrors: sdk/tests/lib/mirrors/instantiate_abstract_class_test.dart Lines 40 to 44 in 6362326
Should |
The text was unclear. It's no longer relevant in the |
I don't believe this is used anywhere, but causes failures once the class is removed from the core libraries. Split off from https://dart-review.googlesource.com/c/sdk/+/259041 Bug: #49529 Change-Id: I9a215c981b0359b1d4521df9a330ec263b3b6c04 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274382 Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
`CastError` is replaced by `TypeError`. Also makes the fields of TypeError nullable. See: #49279 TEST=build SDK and run default suites. Bug: #49529 Change-Id: I7e880ff2d8b18c4bffdd7a942efd743244a12734 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274381 Reviewed-by: Tess Strickland <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
Split off https://dart-review.googlesource.com/c/sdk/+/259041 so that the VM changes can be landed separately. TEST=tests/lib/mirrors/instantiate_abstract_class_test.dart Bug: #49529 Change-Id: Ic06dee0dfeaea64d9d9ffd9511ec66d9d0837e7e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274383 Reviewed-by: Michael Thomsen <[email protected]> Reviewed-by: Tess Strickland <[email protected]> Commit-Queue: Daco Harkes <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
Contributes to #49529 Change-Id: I65d147aa8f5f692df00663f5fac024351da7aaa7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272161 Commit-Queue: Johnni Winther <[email protected]> Reviewed-by: Jens Johansen <[email protected]>
Contributes to #49529 Change-Id: Ib70efd0f388f50686e1745ca5237d06a4538a870 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268460 Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
Contributes to #49529 Change-Id: I2cef41b991c59869f606235929347449e17022cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271082 Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Lasse Nielsen <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
@mit-mit Are you expecting there will be tracking issues for the removal of CyclicInitializationError and NullThrownError. Is there already discussion happening somewhere? |
Those are expected to be removed next few days; CLs will be linked from the top comment. |
In preparation for removal of the List default constructor from dart:core. See #49529 TEST=existing Change-Id: I68cd8097ed33c0b0d91a75cd890f53fd1ea1ed09 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273723 Reviewed-by: Alexander Markov <[email protected]> Reviewed-by: Aske Simon Christensen <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
This deprecated class cannot be removed just yet because we still need to throw something in case of cyclic initialization in Dart legacy libraries (which are still supported). Class CyclicInitializationError is copied for each implementation (VM, dart2js and DDC) and made private. Each implementation now has an independent private class which can be removed separately. TEST=ci Issue: #49529 Change-Id: I8100bbe16636c12c4cbabbb5fe770f4c648c4249 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275120 Commit-Queue: Michael Thomsen <[email protected]> Reviewed-by: Lasse Nielsen <[email protected]> Reviewed-by: Siva Annamalai <[email protected]> Reviewed-by: Sigmund Cherem <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
TEST=ci Bug: Contributes to #49529 Change-Id: Ic129ef2d89f625d9ec6a7a1c301cffddd60b2ff7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258920 Reviewed-by: Lasse Nielsen <[email protected]> Commit-Queue: Michael Thomsen <[email protected]> Reviewed-by: Slava Egorov <[email protected]>
…t:core` errors TEST=ci Bug: #49529 Change-Id: I52495d3e5319f0555714f4f8247149afc06128a1 Cq-Include-Trybots: luci.dart.try:vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,vm-kernel-nnbd-mac-debug-arm64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,dart-sdk-linux-arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259041 Commit-Queue: Michael Thomsen <[email protected]> Reviewed-by: Daco Harkes <[email protected]> Reviewed-by: Lasse Nielsen <[email protected]> Reviewed-by: Johnni Winther <[email protected]>
All done, closing |
See: #49529 Change-Id: Id52ac534405b3552812e6bb8ce49e09c60cbdfd9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276770 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]>
hey @mit-mit you forgot |
Making It's not, technically, considered breaking, even though it prevents some uses from being continued. The existing code, running at language version 2.19, will keep working until support for pre-3.0 code is removed, which is unlikely to be soon. The list of classes which have become final are (lifted directly from the source code):
|
@lrhn I appreciate your perspective, but I must disagree with the assertion that As a library creator, supporting all major Dart version updates is crucial to prevent the library from becoming obsolete. The Please don't misunderstand me; I adore Dart and the team behind it, and I will always be thankful for the impact it had on my life when I chose it for ClojureDart. I would simply prefer minimal Breaking Changes. Thanks for all your work 🙇 |
The following Dart core library APIs, which are all currently deprecated, are now being fully removed.
This is the continuation of previous discontinuation work tracked in #34233
Phase II, scheduled for Dart 3.0
The following APIs are planned to be removed in 3.0, as some breakage is to be expected.
API changes which we believe are minimally breaking
dart:core
onError
argument toint.parse
,double.parse
,num.parse
:CL: https://dart-review.googlesource.com/c/sdk/+/259042
proxy
constant:CL: https://dart-review.googlesource.com/c/sdk/+/258004
Provisional
class and associated constant:CL: https://dart-review.googlesource.com/c/sdk/+/258004
List
constructor (useList.Filled
):CL: https://dart-review.googlesource.com/c/sdk/+/258920
BidirectionalIterator
class:CL: https://dart-review.googlesource.com/c/sdk/+/276741
Deprecated.expires
getter onDeprecated
. UseDeprecated.message
instead.AbstractClassInstantiationError
class (no longer relevant indart:core
libraries.dart:mirrors
may still throw it and now has it's own definition of it):CL: https://dart-review.googlesource.com/c/sdk/+/274383
CastError
class (useTypeError
):https://dart-review.googlesource.com/c/sdk/+/259041
FallThroughError
class (Unused since Dart 2.0):https://dart-review.googlesource.com/c/sdk/+/261860,
CL: https://dart-review.googlesource.com/c/sdk/+/259041
NoSuchMethodError
default constructor (use the named constructorNoSuchMethod.withInvocation
):CL: https://dart-review.googlesource.com/c/sdk/+/271082
CyclicInitializationError
(will never be thrown from code with sound null safety):https://dart-review.git.corp.google.com/c/sdk/+/275120
NullThrownError
(will never be thrown from code with sound null safety):https://dart-review.googlesource.com/c/sdk/+/275840
dart:async
DeferredLibrary
class (use thedeferred as
import syntax):CL: https://dart-review.git.corp.google.com/c/sdk/+/268460
dart:developer
MAX_USER_TAGS
inUserTag
:CL: https://dart-review.git.corp.google.com/c/sdk/+/268340
dart:mirrors
None.
dart:html
document.registerElement
®isterElement2
:[dart:html] Breaking change: delete registerElement* APIs in dart:html #49536,
CL 📝: https://dart-review.git.corp.google.com/c/sdk/+/268461
API changes which may be more breaking
These are postponed, and not planned for inclusion in Dart 3.
###dart:core
[ ]IntegerDivisionByZeroException
exception (useUnsupportedError
):RemoveIntegerDivisionByZeroException
#30743[ ] Errors:###dart:async
[ ]runZoned
arg ononError
:CL: https://dart-review.googlesource.com/c/sdk/+/248002The text was updated successfully, but these errors were encountered: