Skip to content

[web, tool] Look into public packages blocking wasm builds and reporting them in analytics #178894

Closed

Description

@kevmoo

There are three classes of package:

  • -ha - the "host application". Do NOT include the actual app package name.
  • -pp - a "private package", i.e. non-public and/or non-published package. Do NOT include the actual name of any non-public package.
  • [pkg name]:X.Y.Z - the name of a public, published package with the version (with truncated zeros, see below)

The hyphen is critical. Since hyphens are not allowed in package names, we make sure we don't have collisions.

To determine if a package can be reported in analytics, look at pubspec.lock

A package is considered public and loggable if an only if:

  • source: hosted
  • description -> url: "https://pub.dev"

Here's an example entry from a pubspec.lock file.

  args:
    dependency: transitive
    description:
      name: args
      sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
      url: "https://pub.dev"
    source: hosted
    version: "2.7.0"

Any analytics reporting should include the package name and version. Because we are limited to 100 characters, we want this to be short. So the predefined values are 3 characters long. There should be no spaces. There should be no duplicate entries. The version should be truncated if the last value is 0. So pkg1 at v1.0.0 should be logged as pkg1:1 and pkg2 at v2.3.0 should be logged as pkg2:2.3.

A sample report could look like:

-ha,-pp,pkg1:1.2.5,pkg2:1,pkg3:1.2

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    e: wasmIssues related to the wasm build of Flutter Web.
    team-webOwned by Web platform team
    on Nov 21, 2025
  2. changed the title [-][web, tool] Look into public packages blocking web builds and reporting them in analytics[/-] [+][web, tool] Look into public packages blocking wasm builds and reporting them in analytics[/+] on Nov 21, 2025
  3. added
    P2Important issues not at the top of the work list
    triaged-webTriaged by Web platform team
    on Dec 3, 2025
  4. added
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on Dec 3, 2025
  5. assigned and unassigned on Dec 10, 2025
  6. kevmoo commented on Jan 5, 2026

    @kevmoo
    ContributorAuthor

    We have data all the way through. Now pondering if we can "roll up" usage of package:js one level to report packages USING it.

  7. srujzs commented on Jan 20, 2026

    @srujzs
    Contributor

    I believe there are two things we want here looking at our dry run reporting in dart2wasm:

    • Reporting of package:js imports in user code.
    • Reporting of dart:js_util imports in user code (which is also available through in package:js).

    The current JS interop checks do not check for imports beyond dart:ffi in dart2wasm only (maybe at some point this included more like invalid JS interop libraries, but not anymore). We have explicit checks for dart:js and dart:html and have associated dry run codes for those, so we'll have to do the same for these two imports.

  8. srujzs commented on Jan 20, 2026

    @srujzs
    Contributor

    maybe at some point this included more like invalid JS interop libraries, but not anymore

    Yeah, I think when we fully removed package:js and dart:js_util support from dart2wasm, we removed these from the interop checks because the CFE would already report the errors. This had the side-effect of affecting this dry-run. It's better anyways that we explicitly check for those imports in the dry run instead of relying on the JS interop checks.

  9. srujzs commented on Jan 20, 2026

    @srujzs
    Contributor

    I can add the extra errors for the two imports and it doesn't look like Flutter needs to be updated after that as it just pipes the error code directly through.

  10. assigned and unassigned on Jan 20, 2026
  11. kevmoo commented on Jan 27, 2026

    @kevmoo
    ContributorAuthor

    Closing this out. I think we're good with the last commit.

  12. github-actions commented on Feb 10, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  13. locked as resolved and limited conversation to collaborators on Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work liste: wasmIssues related to the wasm build of Flutter Web.team-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions