Skip to content

Label package:js as "legacy" #54571

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

Closed
srujzs opened this issue Jan 10, 2024 · 4 comments
Closed

Label package:js as "legacy" #54571

srujzs opened this issue Jan 10, 2024 · 4 comments
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. closed-duplicate Closed in favor of an existing report web-js-interop Issues that impact all js interop

Comments

@srujzs
Copy link
Contributor

srujzs commented Jan 10, 2024

Now that we have dart:js_interop and dart:js_interop_unsafe, we should point users to these libraries instead. This can go as part of the README in package:js (or maybe somewhere on pub?). This does not mean this library is deprecated and users need to migrate over. That will be done at some future date that is not yet known.

This also aligns us with some of the changes to mark libraries as Web (Legacy) on https://api.dart.dev/stable/3.2.4/index.html.

@srujzs srujzs added web-js-interop Issues that impact all js interop area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. labels Jan 10, 2024
@parlough
Copy link
Member

As a sort of related note, I've updated DartPad to provide a diagnostic on usages of dart:js to suggest users migrate. I'll be doing the same for package:js and dart:js_util soon, likely alongside the 3.3 release.

@kevmoo
Copy link
Member

kevmoo commented Jan 10, 2024

@parlough – do we want to do a one-off in dartpad, or just use hint/lints in the analyzer?

@parlough
Copy link
Member

parlough commented Jan 10, 2024

@parlough – do we want to do a one-off in dartpad, or just use hint/lints in the analyzer?

Well it's not necessarily one-off as I previously added general support for deprecating packages that we want to drop as well as core libraries we don't support. However, if an analyzer warning or lint is added, we can easily switch over to that for versions of the SDK that support it. I'd be happy to help implement the lint if that's the desired direction!

A bit separate of a discussion as it's about the core libraries, but rather than a lint, I personally prefer an opt-in mode that the analyzer and web compilers can use to switch to an SDK outline without these libraries (#54347). That way they don't even show up in completion suggestions.

@parlough
Copy link
Member

Duplicate of #54792

I'm going to close this in favor of #54792 which outlines a specific path for doing this (a pub release with readme update).

Feel free to reopen if you think this issue is different enough. Thanks!

@parlough parlough closed this as not planned Won't fix, can't repro, duplicate, stale Jan 31, 2024
@parlough parlough added the closed-duplicate Closed in favor of an existing report label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-js Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop. closed-duplicate Closed in favor of an existing report web-js-interop Issues that impact all js interop
Projects
Status: Done
Development

No branches or pull requests

3 participants