-
Notifications
You must be signed in to change notification settings - Fork 44
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
Detect and reward packages that are wasm compatible #1324
Comments
Can link to http://dart.dev/go/package-web which will point to "the right docs" when we're ready |
It seems a bit premature to take points away before the old APIs are clearly marked as deprecated and new APIs are marked stable? |
We've already added notes to the legacy APIs - https://api.dart.dev/main/dart-html/dart-html-library.html We want a signal on pub first. Deprecations are loud and tend to cause lots of issues for the world. We just want to put (a bit) of pressure on the ecosystem. We are not taking ANY points away. We're just giving the opportunity to earn more points for "doing the right thing" 😄 |
Everyone will want some of the Wasm bling! I definitely like that more than reducing points as they can be a source of frustration for developers. |
Is this still a P1 issue? |
I'd like some of the false positives/negatives to be prioritized. maybe not p1, though. |
@kevmoo, Can we try to flesh the remaining work out a bit. What false positives/negatives do we know? Currently a package gets is:wasm-ready iff:
Is that the right rule? Do we have any other things we want to affect the decision? |
@sigurdm – that sounds right, but we should look at the items at dart-lang/pub-dev#6785 (comment) We should also exclude imports of |
I don't know if allowlisting is easier vs denylisting, but from the interop side, anything from the "previous libraries" section here: https://dart.dev/interop/js-interop#next-generation-js-interop is considered not Wasm-compatible. |
Ah sorry - somehow overlooked this list:
This has migrated. I checked out 709bdcd4 to investigate. The import is in lib/intl_browser.dart:12:import 'dart:html'; not the "main library" (named the same as the package) that is why we still assign the tag.
It doesn't import the offending file from the intl package -> it gets the tag.
Only depends on dart:html from: Not from the main library file (the one named the same as the library).
No longer true. I checked out the last version containing the imports
Seems OK
This one is interesting. The Also the federated plugin structure means that you could potentially replace
Another interesting one: https://github.com/fluttercommunity/plus_plugins/blob/main/packages/sensors_plus/sensors_plus/lib/sensors_plus.dart#L7 has a conditional import of the web-part. But that is conditioned on When compiling for WASM the To me that shows a weakness of the conditional import system. Not sure how we should handle this.
Not the main lib.
Indeed. The we index the latest stable (non-prerelease) version.
Those are already excluded (that is the second 'f' of iff). |
|
It indeed seems detecting wasm-incompatibility for federated plugins will be hard. Flutter generates code that imports the platform specific implementations -> we cannot just follow import paths. But one could argue that a federated plugin is wasm-ready (while it's default web option might not be). But that is of course mostly being technically correct... |
Note: a similar case happened with my |
WASM support is stable with Flutter 3.22.0. I would have expected this to be ready for the release or even well before so developers know what packages work with it and package maintainers get nudged to update. Has there been any progress? |
@Rexios80: Have you checked this search filter on pub.dev? |
That is not very discoverable, there isn't a badge on compatible packages, and it doesn't do anything to incentivize package maintainers to support WASM. I think adding another 10 points for WASM support would be much preferable as that is a strong nudge to migrate. Are there any APIs |
Currently pub.dev has badges for:
We don't have badges, but we do have search filters (if you read help pages) for:
I think wasm is more like a runtime than a platform. Hence, I don't think we know how we want to add it in the UI. We could add a different kind of badge: I think granting 10 points or something like that for packages that are wasm-ready, in the platform scoring section might be reasonable. Not sure was @kevmoo thinks about all this. |
The thing that makes most sense is flagging That's my technical answer, but I'd want to brainstorm the right "community/ecosystem" way to do this so we don't hurt folks feelings. |
I think we should be careful flagging it just yet. But I think that giving 5-10 points for avoiding
That probably includes avoiding transitive imports of legacy-html. |
Is there a reason for dart:html to stick around besides maintainers not migrating? I see no reason to not penalize them for not keeping up to date with Dart best practices. |
I think it's safe to assume that not all migrations are trivial. There are some very large Dart code bases out there. Migrating them might take years. It might be easier to rely on backwards compatibility, even if you don't get some of the benefits of the new interop model. |
It is worth to keep in mind that life happens to all of us, and not everyone is ready to put effort in migrating on day one (or day 20). If you need a package to be migrated, please, by all means reach out to its developers, and help them to do so. API deprecation and with that some kind of penalty may happen down the line, but I don't see any reason to rush it. |
I don't see any reason to not rush it. WASM support is touted as "stable" in Flutter 3.22.0 and yet six out of seven of my web projects fail to build due to various migration issues that are outside of my control. I'm afraid if we don't push hard for migration now it just won't happen for many packages. |
Also how is this any different than regular deprecations in the Dart/Flutter SDKs. Those already immediately cause loss of points due to the analysis issues they generate. |
@Rexios80: In my experience SDK deprecations rarely affect the score of a well-maintained package. wasm support is a new feature, less than a week old in a stable SDK. The effect and scale is not even comparable. Again: if it is urgent for you for you, please consider to help out the developers of the packages that have a migration task ahead of them. |
Repurposing this issue to track a specific platform/label of "good" wasm users. This will allow giving "bling" to folks on the package site.
The text was updated successfully, but these errors were encountered: