[dart-announce] Breaking change 49529: Dart 3 removal of deprecated core library APIs

Skip to first unread message

'Michael Thomsen' via Dart Announcements

unread,
Dec 15, 2022, 7:43:46 AM12/15/22
to Dart Announcements

Change

A number of already deprecated core library APIs are being fully removed:

dart:core

  • onError argument to int.parse, double.parse, num.parse
  • proxy constant
  • Provisional class and associated constant
  • List constructor (use List.Filled)
  • Deprecated.expires getter on Deprecated. Use Deprecated.message instead.
  • AbstractClassInstantiationError class (no longer relevant in dart:core libraries. dart:mirrors may still throw it.)
  • CastError class (use TypeError)
  • FallThroughError class (Unused since Dart 2.0)
  • NoSuchMethodError default constructor (use the named constructor NoSuchMethod.withInvocation)
  • CyclicInitializationError (will never be thrown from code with sound null safety)
  • NullThrownError (will never be thrown from code with sound null safety)
dart:async
  • DeferredLibrary class (use the deferred as import syntax)
dart:developer
  • MAX_USER_TAGS in UserTag
dart:html
  • document.registerElement & registerElement2

Rationale

The APIs have been deprecated for several releases. Most of them are no longer relevant in Dart code migrated to sound nulls safety.

Impact

Any code using these APIs will no longer analyze, compile, or run.

Schedule

The APIs are in the process of being removed in dev-channel builds of Dart 3.

Mitigation

See migration notes in the tracking issue:
https://github.com/dart-lang/sdk/issues/49529

--
For more ways to connect visit https://dart.dev/community
Reply all
Reply to author
Forward
0 new messages