-
Notifications
You must be signed in to change notification settings - Fork 1.8k
breaking change: removing WebSQL APIs #46316
Copy link
Copy link
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.breaking-change-requestThis tracks requests for feedback on breaking changesThis tracks requests for feedback on breaking changesweb-librariesIssues impacting dart:html, etc., librariesIssues impacting dart:html, etc., libraries
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.breaking-change-requestThis tracks requests for feedback on breaking changesThis tracks requests for feedback on breaking changesweb-librariesIssues impacting dart:html, etc., librariesIssues impacting dart:html, etc., libraries
The WebSQL standard was abandoned more than 10 years ago and is not supported by many browsers.
The
dart:web_sqllibrary has been documented as unsupported and deprecated for several years as well and but wasn't annotated properly. Since Dart 2.14dart:web_sqland the relatedwindow.openDatabaseAPI exposed bydart:htmlhave been marked deprecated.We plan to completely remove these APIs in a future Dart release, likely in Dart 2.15.
What can break?
Any app that imports
dart:web_sqlor that useswindow.openDatabasewould start seeing compile-time errors.Mitigation
The main mitigation is to remove any imports to
dart:web_sqland uses ofwindow.openDatabase.We don't expect uses of these APIs though, given how the underlying functionality is missing in many browsers. If however, such uses exist (say for a chrome-only app), the recommendation is to switch to use either web storage or indexeddb.
We did a study in internal systems and in 15K external packages (using
pub_crawl) and didn't find any relevant uses of these APIs. We found only two benign matches: one in a discontinued package, and one in a autogenerated library that mocksdart:htmland reachable libraries.@franklinyow @vsmenon @mit-mit @kevmoo
@grouma @Hixie - for approvals