flutter / flutter/flutter

[material_ui][pana] pana 0.23.18 reports Web as unsupported although the application builds successfully with WebAssembly

Open
#191,887 1 comment 0 reactions 0 assignees View on GitHub
has reproducible steps p: material_ui P2 package platform-web team-design triaged-design
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

I'm not sure whether this is a `material_ui` issue or `pana` issue, but I firstly report it here.

### Steps to reproduce

Run the following commands with the code sample below:

```
dart pub global activate pana 0.23.18
dart pub global run pana:pana --json --no-warning --no-dartdoc .
```

### Expected results

The output contains:

```json
"tags": [
"is:wasm-ready"
]
```

It also reports:

```
Supports 6 of 6 possible platforms
WASM compatibility
This package is compatible with runtime `wasm`
```

### Actual results

The output contains no tags:

```
"tags": []
```

It reports Web as unsupported with the following import chain:

```
Package not compatible with platform Web

Because:
* package:material_ui_pana_repro/main.dart that imports:
* package:material_ui/material_ui.dart that imports:
* package:material_ui/src/about.dart that imports:
* dart:io
```

Please note that pana 0.23.5 correctly outputs `is:wasm-ready` and it MAY BE a pana issue...

### Code sample

`pubspec.yaml`:

```yaml
name: material_ui_pana_repro
description: Minimal reproduction for material_ui causing pana to omit is:wasm-ready.
version: 0.1.0

environment:
sdk: ^3.12.0
flutter: '>=3.47.0'

dependencies:
flutter:
sdk: flutter
material_ui: ^1.0.0

dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
```

`lib/main.dart`:

```dart
import 'package:material_ui/material_ui.dart';

void main() {
runApp(const MainApp());
}

class MainApp extends StatelessWidget {
const MainApp({super.key});

@override
Widget build(BuildContext context) {
return const MaterialApp(
home: Scaffold(
body: Center(
child: Text('material_ui builds successfully with WebAssembly'),
),
),
);
}
}
```

The application does not use `AboutDialog` or any API that directly requires `dart:io`.

### Logs

Logs

```console
dart pub global run pana:pana --json --no-warning --no-dartdoc .
{"logName":"pana","level":"INFO","message":"Running `dart --version`..."}
{"logName":"pana","level":"INFO","message":"Running `dart pub get --no-example`..."}
{"logName":"pana","level":"INFO","message":"Running `dart pub get --no-example`..."}
{"logName":"pana","level":"INFO","message":"Running `dart pub outdated --json --up-to-date --no-dev-dependencies --no-dependency-overrides`..."}
{"logName":"pana","level":"INFO","message":"Analyzing package..."}
{"logName":"pana","level":"INFO","message":"Running `dart analyze --format machine --no-plugins .`..."}
{"logName":"pana","level":"INFO","message":"Running `dart pub get --no-example`..."}
{"logName":"pana","level":"INFO","message":"Running `dart format --output=none --set-exit-if-changed /tmp/pana_FCZNFA/.`..."}
{"logName":"pana","level":"INFO","message":"Analyzing pub downgrade..."}
{"logName":"pana","level":"INFO","message":"Running `dart pub downgrade --no-example`..."}
{"logName":"pana","level":"INFO","message":"Running `dart analyze --format machine --no-plugins .`..."}
{"logName":"pana","level":"INFO","message":"[pub-downgrade-success]"}
{"logName":"pana","level":"INFO","message":"Running `dart pub upgrade --no-example`..."}
{
"createdAt": "2026-08-28T00:16:57.923409",
"runtimeInfo": {
"panaVersion": "0.23.18",
"sdkVersion": "3.13.1",
"flutterVersions": {
"frameworkVersion": "3.47.1",
"channel": "stable",
"repositoryUrl": "https://github.com/flutter/flutter",
"frameworkRevision": "6655482ec06e547f90abf8ae7590466f4415978d",
"frameworkCommitDate": "2026-08-19 10:07:23 -0700",
"engineRevision": "5d531788691ec3404cac0cee66ead4007b177363",
"engineCommitDate": "2026-08-18 23:36:01.000Z",
"engineContentHash": "11d79658c444477b06513d32b52c8c4ccb7276b0",
"engineBuildDate": "2026-08-19 12:19:20.672",
"dartSdkVersion": "3.13.1",
"devToolsVersion": "2.60.0",
"flutterVersion": "3.47.1"
}
},
"packageName": "material_ui_pana_repro",
"packageVersion": "0.1.0",
"pubspec": {
"name": "material_ui_pana_repro",
"description": "Minimal reproduction for material_ui causing pana to omit is:wasm-ready.",
"version": "0.1.0",
"environment": {
"sdk": "^3.12.0",
"flutter": ">=3.47.0"
},
"dependencies": {
"flutter": {
"sdk": "flutter"
},
"material_ui": "^1.0.0"
},
"dev_dependencies": {
"flutter_test": {
"sdk": "flutter"
},
"flutter_lints": "^6.0.0"
}
},
"allDependencies": [
"characters",
"clock",
"collection",
"cupertino_ui",
"flutter",
"flutter_lints",
"flutter_test",
"intl",
"material_color_utilities",
"material_ui",
"meta",
"path",
"vector_math"
],
"tags": [
"sdk:flutter",
"platform:android",
"platform:ios",
"platform:windows",
"platform:linux",
"platform:macos",
"is:null-safe",
"is:dart3-compatible",
"license:unknown"
],
"report": {
"sections": [
{
"id": "convention",
"title": "Follow Dart file conventions",
"grantedPoints": 5,
"maxPoints": 30,
"status": "failed",
"summary": "### [x] 0/10 points: Provide a valid `pubspec.yaml`\n\n* `pubspec.yaml` doesn't have a `homepage` entry.\n\n* `pubspec.yaml` doesn't have a `repository` entry.\n\n### [*] 5/5 points: Provide a valid `README.md`\n\n### [x] 0/5 points: Provide a valid `CHANGELOG.md`\n\n\n\nNo `CHANGELOG.md` found.\n\n\nChangelog entries help developers follow the progress of your package. Check out the Dart conventions for [Maintaining a package changelog](https://dart.dev/tools/pub/package-layout#changelog).\n\n\n### [x] 0/10 points: Use an OSI-approved license\n\n\n\nNo license was recognized.\n\n\nConsider using an [OSI-approved license](https://opensource.org/licenses) in the `LICENSE` file to make it more accessible to the community.\n\n"
},
{
"id": "documentation",
"title": "Provide documentation",
"grantedPoints": 0,
"maxPoints": 10,
"status": "failed",
"summary": "### [x] 0/10 points: Package has an example\n\n\n\nNo example found.\n\n\nSee [package layout](https://dart.dev/tools/pub/package-layout#examples) guidelines on how to add an example.\n\n"
},
{
"id": "platform",
"title": "Platform support",
"grantedPoints": 20,
"maxPoints": 20,
"status": "passed",
"summary": "### [*] 20/20 points: Supports 5 of 6 possible platforms (**iOS**, **Android**, Web, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n\n* ✓ iOS\n\n* ✓ Windows\n\n* ✓ Linux\n\n* ✓ macOS\n\n\nThese platforms are not supported:\n\n\n\nPackage not compatible with platform Web\n\n\nBecause:\n* `package:material_ui_pana_repro/main.dart` that imports:\n* `package:material_ui/material_ui.dart` that imports:\n* `package:material_ui/src/about.dart` that imports:\n* `dart:io`\n\n"
},
{
"id": "analysis",
"title": "Pass static analysis",
"grantedPoints": 50,
"maxPoints": 50,
"status": "passed",
"summary": "### [*] 50/50 points: code has no errors, warnings, lints, or formatting issues\n"
},
{
"id": "dependency",
"title": "Support up-to-date dependencies",
"grantedPoints": 40,
"maxPoints": 40,
"status": "passed",
"summary": "### [*] 10/10 points: All of the package dependencies are supported in the latest version\n\n|Package|Constraint|Compatible|Latest|Notes|\n|:-|:-|:-|:-|:-|\n|[`material_ui`]|`^1.0.0`|1.1.0|1.1.0||\n\nTransitive dependencies\n\n|Package|Constraint|Compatible|Latest|Notes|\n|:-|:-|:-|:-|:-|\n|[`characters`]|-|1.4.1|1.4.1||\n|[`clock`]|-|1.1.2|1.1.2||\n|[`collection`]|-|1.19.1|1.19.1||\n|[`cupertino_ui`]|-|1.0.1|1.0.1||\n|[`intl`]|-|0.20.3|0.20.3||\n|[`material_color_utilities`]|-|0.13.0|0.13.1||\n|[`meta`]|-|1.19.0|1.19.0||\n|[`path`]|-|1.9.1|1.9.1||\n|[`vector_math`]|-|2.4.2|2.4.2||\n\n\nTo reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.\n\n[`material_ui`]: https://pub.dev/packages/material_ui\n[`characters`]: https://pub.dev/packages/characters\n[`clock`]: https://pub.dev/packages/clock\n[`collection`]: https://pub.dev/packages/collection\n[`cupertino_ui`]: https://pub.dev/packages/cupertino_ui\n[`intl`]: https://pub.dev/packages/intl\n[`material_color_utilities`]: https://pub.dev/packages/material_color_utilities\n[`meta`]: https://pub.dev/packages/meta\n[`path`]: https://pub.dev/packages/path\n[`vector_math`]: https://pub.dev/packages/vector_math\n\n### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs\n\n### [*] 20/20 points: Compatible with dependency constraint lower bounds\n\n`pub downgrade` does not expose any static analysis error.\n"
}
]
},
"screenshots": [],
"result": {
"repositoryStatus": "unspecified",
"licenses": [],
"grantedPoints": 115,
"maxPoints": 150
},
"urlProblems": [],
"scores": {
"grantedPoints": 115,
"maxPoints": 150
}
}
```

### Flutter Doctor output

Doctor output

```console
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.47.1, on Ubuntu 26.04 LTS 6.18.35.2-microsoft-standard-WSL2, locale C.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the report from pubspec.yaml and lib/main.dart with pana 0.23.18, then compare it with pana 0.23.5. Trace the reported import chain through material_ui/src/about.dart and check why the analyzer omits is:wasm-ready; done means the expected tag and WebAssembly compatibility report are restored for this reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, wasm
Domain
tooling, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.