Skip to content
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

breaking change: removing WebSQL APIs #46316

Closed
sigmundch opened this issue Jun 9, 2021 · 12 comments
Closed

breaking change: removing WebSQL APIs #46316

sigmundch opened this issue Jun 9, 2021 · 12 comments
Assignees
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. breaking-change-request This tracks requests for feedback on breaking changes P2 A bug or feature request we're likely to work on web-libraries Issues impacting dart:html, etc., libraries

Comments

@sigmundch
Copy link
Member

The WebSQL standard was abandoned more than 10 years ago and is not supported by many browsers.

The dart:web_sql library has been documented as unsupported and deprecated for several years as well and but wasn't annotated properly. Since Dart 2.14 dart:web_sql and the related window.openDatabase API exposed by dart:html have 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_sql or that uses window.openDatabase would start seeing compile-time errors.

Mitigation

The main mitigation is to remove any imports to dart:web_sql and uses of window.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 mocks dart:html and reachable libraries.

@franklinyow @vsmenon @mit-mit @kevmoo

@grouma @Hixie - for approvals

@sigmundch sigmundch added breaking-change-request This tracks requests for feedback on breaking changes area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. labels Jun 9, 2021
@sigmundch sigmundch self-assigned this Jun 9, 2021
@sigmundch sigmundch added the web-libraries Issues impacting dart:html, etc., libraries label Jun 9, 2021
@kevmoo
Copy link
Member

kevmoo commented Jun 9, 2021

:shipit: 👍

@grouma
Copy link
Member

grouma commented Jun 9, 2021

LGTM. I found no usages within AngularDart or any client code within Google.

@Hixie
Copy link
Contributor

Hixie commented Jun 10, 2021

As the original author of the WebSQL proposal I heartily endorse this change.

@franklinyow
Copy link
Contributor

ping: @mit-mit @vsmenon @kevmoo for approvals

@kevmoo
Copy link
Member

kevmoo commented Jul 14, 2021

Approved!

@vsmenon
Copy link
Member

vsmenon commented Jul 19, 2021

lgtm!

@grouma
Copy link
Member

grouma commented Jul 19, 2021

LGTM. I can't find any real usages of it in Google3.

@franklinyow
Copy link
Contributor

Approved. Please add the proper Milestone for this.

@devoncarew
Copy link
Member

@sigmundch - is this going out as part of 2.14 or 2.15?

@sigmundch
Copy link
Member Author

2.15 - The deprecation of WebSQL went out in 2.14 (landed in d52475c1663). However the deletion of the APIs hasn't happened yet.

@sigmundch sigmundch added the P2 A bug or feature request we're likely to work on label Oct 12, 2021
@mit-mit
Copy link
Member

mit-mit commented Mar 7, 2022

@sigmundch can you confirm that these are now fully removed?

@sigmundch
Copy link
Member Author

Confirmed - the change that fully removed support for it (38b5a84) was released in 2.15.0. The only thing that remains is cleanup on our end, but that's not visible to external developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web Use area-web for Dart web related issues, including the DDC and dart2js compilers and JS interop. breaking-change-request This tracks requests for feedback on breaking changes P2 A bug or feature request we're likely to work on web-libraries Issues impacting dart:html, etc., libraries
Projects
None yet
Development

No branches or pull requests

8 participants