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

☔ Deprecate legacy HTML/JS libraries/packages #59716

Open
2 of 5 tasks
kevmoo opened this issue Dec 13, 2024 · 5 comments
Open
2 of 5 tasks

☔ Deprecate legacy HTML/JS libraries/packages #59716

kevmoo opened this issue Dec 13, 2024 · 5 comments
Assignees
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...).

Comments

@kevmoo
Copy link
Member

kevmoo commented Dec 13, 2024

  • Mark legacy dart: libraries as deprecated
  • Mark https://pub.dev/packages/js as discontinued
  • Remove "legacy" web section from api.dart.dev - hide these docs
  • Update docs on the Dart (and Flutter?) web site
@kevmoo kevmoo added the area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...). label Dec 13, 2024
@kevmoo kevmoo changed the title META: Deprecate legace HTML/JS libraries/packages META: Deprecate legacy HTML/JS libraries/packages Dec 13, 2024
@kevmoo kevmoo self-assigned this Dec 13, 2024
@ahmednfwela
Copy link

Shouldn't all the missing api issues be solved before deprecating old packages? this way consumers can have a clear migration path.

copybara-service bot pushed a commit that referenced this issue Dec 17, 2024
Towards #59716

Change-Id: Iaea45a8fccf5c3e2fb52ef34420ddbcd5b92a13f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401201
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
@srujzs
Copy link
Contributor

srujzs commented Dec 17, 2024

That tag covers more than just "missing from package:web but are in the web libraries", so it isn't necessarily an indicator of migrate-ability.

Something would be a blocker if a functionality was exposed before which has no alternative or workaround in either package:web or dart:js_interop(_unsafe) that wasn't intended by design (e.g. dynamic dispatch). On a brief pass, I don't see that as the case for any of those issues. Of course, if something is very confusing or annoying to deal with for users, then we should prioritize those issues and consider that as a blocker.

The motivation behind this is to avoid further proliferation of legacy interop code and eventually get it down to a point where the ecosystem can move forward with Wasm easily.

@ahmednfwela
Copy link

the highest impact issue I can think of that needs to be addressed is callback interfaces, e.g. EventListener

package:web defines it as:
typedef EventListener = JSFunction; (incorrect)
while dart:html defines it as:
typedef EventListener = dynamic Function(Event event); (correct)

this means that all customers migrating to package:web instantly lose type safety for EventListener parameters, this affects EVERY SINGLE html element.

@ahmednfwela
Copy link

ahmednfwela commented Dec 17, 2024

This was also discussed a while back #56358 and I have raised the same concern

@kevmoo kevmoo changed the title META: Deprecate legacy HTML/JS libraries/packages ☔ Deprecate legacy HTML/JS libraries/packages Dec 18, 2024
@srujzs
Copy link
Contributor

srujzs commented Dec 20, 2024

There's a canonical issue for typing JS functions: https://dart-review.googlesource.com/c/sdk/+/401046. There are some downsides to generating typed JSFunctions everywhere in package:web but I think it'd be a net positive.

copybara-service bot pushed a commit that referenced this issue Dec 20, 2024
#59716

Deprecate dart:html, dart:svg, dart:indexed_db, dart:web_audio,
and dart:web_gl in favor of package:web and dart:js_interop.

dart:web_sql has already been deprecated and unable to be
imported.

CoreLibraryReviewExempt: JS-specific library, deprecation only.
Change-Id: I2799b474be660153318a60d5e801ecd8431b08a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401045
Reviewed-by: Sigmund Cherem <sigmund@google.com>
copybara-service bot pushed a commit that referenced this issue Dec 20, 2024
#59716

Deprecate these in favor of dart:js_interop. Modifies code
samples to account for the deprecated imports.

CoreLibraryReviewExempt: JS-specific library, deprecation only.
Change-Id: I9f01cd203212aaeca08aa1c5a4000b67f54756b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/401046
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-meta Cross-cutting, high-level issues (for tracking many other implementation issues, ...).
Projects
None yet
Development

No branches or pull requests

3 participants