dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.25k stars 1.58k forks source link

Track: Remove deprecated core library APIs #49845

Open nuritzi opened 2 years ago

nuritzi commented 2 years ago

Goal: We'd like to track progress on removing core library APIs that have earlier been deprecated. This will help us track progress towards our next Dart major version.

Frequency: we'd like to pull these stats on a weekly basis.

How to

You may be able to get this information by # search hits for "@deprecated" in sdk/lib/

Todos

nuritzi commented 2 years ago

@itsjustkevin -- it looks like I don't have the ability to assign issues to people. Are you able to do so? this issue is meant for you to help with after the upcoming release.

itsjustkevin commented 2 years ago

I self-assigned.

itsjustkevin commented 2 years ago

@sigmundch I ran a git grep --count '@deprecated' over the sdk/lib directory and found that a lot of the @deprecated annotations are in dart2js.

My question is, what work do we need to do to remove these deprecations?

grep output

_internal/js_dev_runtime/patch/core_patch.dart:2
_internal/js_dev_runtime/private/isolate_helper.dart:1
_internal/js_runtime/lib/core_patch.dart:2
_internal/vm/lib/double_patch.dart:1
_internal/wasm/lib/double.dart:1
core/annotations.dart:3
core/double.dart:1
core/int.dart:1
core/num.dart:1
html/dart2js/html_dart2js.dart:33
io/security_context.dart:1
web_sql/dart2js/web_sql_dart2js.dart:2
itsjustkevin commented 2 years ago
_internal/js_dev_runtime/patch/core_patch.dart:2
_internal/js_dev_runtime/private/isolate_helper.dart:1
_internal/js_runtime/lib/core_patch.dart:2
_internal/vm/lib/double_patch.dart:1
_internal/wasm/lib/double.dart:1
core/annotations.dart:3
core/double.dart:1
core/int.dart:1
core/num.dart:1
html/dart2js/html_dart2js.dart:33
io/security_context.dart:1
web_sql/dart2js/web_sql_dart2js.dart:2
sigmundch commented 2 years ago

@itsjustkevin - I know you are still circling back on the precise goals here, but some quick insights into the list you shared:

_internal/js_dev_runtime/patch/core_patch.dart:2
_internal/js_dev_runtime/private/isolate_helper.dart:1
_internal/js_runtime/lib/core_patch.dart:2
_internal/vm/lib/double_patch.dart:1
_internal/wasm/lib/double.dart:1
core/double.dart:1
core/int.dart:1
core/num.dart:1

The web_sql library was practically removed for external developers since 2.15. The file exists, but we can ignore it. That's because it is not built into our sdk .dill files and it's not possible to import it (so we made this breaking change already at commit 38b5a841). The reason the file still exists is because cleaning it up is more work than it was worth at the moment.

Finally, as we briefly mentioned on the scrum the other day, the dart:html library is special. Given our plans to put together a new package that will eventually replace this library, we are less inclined to delete the deprecated APIs at this time. It's possible however that we will delete the few APIs related to this breaking change: https://github.com/dart-lang/sdk/issues/49536

mit-mit commented 2 years ago

I'm currently tracking this in https://github.com/dart-lang/sdk/issues/49529