Skip to content

Commit

Permalink
Updated report text for wasm readyness (#1397)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Aug 27, 2024
1 parent 9d1bb7b commit 19d3b0c
Show file tree
Hide file tree
Showing 36 changed files with 59 additions and 34 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.22.12

- Updated report text for `wasm` readiness.

## 0.22.11

- Expose `wasm` readiness analysis in the report (without any score).
Expand Down
14 changes: 11 additions & 3 deletions lib/src/report/multi_platform.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ Future<Subsection> _createWasmSubsection(PackageContext context) async {
description,
[
explanationToIssue(explanation),
RawParagraph(
'This package is not compatible with runtime `wasm`, and will not be rewarded '
'full points in a future version of the scoring model.',
),
RawParagraph('See https://dart.dev/web/wasm for details.'),
],
0,
Expand All @@ -150,8 +154,10 @@ Future<Subsection> _createWasmSubsection(PackageContext context) async {
return Subsection(
description,
[
RawParagraph('Package is compatible with runtime `wasm`. '
'See https://dart.dev/web/wasm for details.')
RawParagraph(
'This package is compatible with runtime `wasm`, and will be rewarded '
'additional points in a future version of the scoring model.'),
RawParagraph('See https://dart.dev/web/wasm for details.'),
],
0,
0,
Expand All @@ -161,7 +167,9 @@ Future<Subsection> _createWasmSubsection(PackageContext context) async {
return Subsection(
description,
[
RawParagraph('Unable to detect compatibility with runtime `wasm`.'),
RawParagraph(
'Unable to detect compatibility with runtime `wasm`, and this package will not '
'be rewarded full points in a future version of the scoring model.'),
RawParagraph('See https://dart.dev/web/wasm for details.'),
],
0,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pana
description: PAckage aNAlyzer - produce a report summarizing the health and quality of a Dart package.
version: 0.22.11
version: 0.22.12-dev
repository: https://github.com/dart-lang/pana
topics:
- tool
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/_dummy_pkg-1.0.0-null-safety.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"grantedPoints": 0,
"maxPoints": 20,
"status": "failed",
"summary": "### [x] 0/20 points: Platform support detection failed\n\n<details>\n<summary>\nCould not determine supported platforms as package resolution failed.\n</summary>\n\nRun `dart pub get` for more information.\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\nUnable to detect compatibility with runtime `wasm`.\nSee https://dart.dev/web/wasm for details."
"summary": "### [x] 0/20 points: Platform support detection failed\n\n<details>\n<summary>\nCould not determine supported platforms as package resolution failed.\n</summary>\n\nRun `dart pub get` for more information.\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\nUnable to detect compatibility with runtime `wasm`, and this package will not be rewarded full points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Run `dart pub get` for more information.

### [x] 0/0 points: WASM compatibility

Unable to detect compatibility with runtime `wasm`.
Unable to detect compatibility with runtime `wasm`, and this package will not be rewarded full points in a future version of the scoring model.
See https://dart.dev/web/wasm for details.

## 0/50 Pass static analysis
Expand Down
4 changes: 2 additions & 2 deletions test/goldens/end2end/async-2.11.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@
"grantedPoints": 10,
"maxPoints": 20,
"status": "failed",
"summary": "### [*] 10/10 points: 20% or more of the public API has dartdoc comments\n\n246 out of 246 API elements (100.0 %) have documentation comments.\n\n### [x] 0/10 points: Package has an example\n\n<details>\n<summary>\nNo example found.\n</summary>\n\nSee [package layout](https://dart.dev/tools/pub/package-layout#examples) guidelines on how to add an example.\n</details>"
"summary": "### [*] 10/10 points: 20% or more of the public API has dartdoc comments\n\n246 out of 263 API elements (93.5 %) have documentation comments.\n\nSome symbols that are missing documentation: `async.AsyncMemoizer.AsyncMemoizer`, `async.ChunkedStreamReader.ChunkedStreamReader`, `async.DelegatingFuture.DelegatingFuture`, `async.DelegatingStream.DelegatingStream`, `async.ErrorResult.ErrorResult`.\n\n### [x] 0/10 points: Package has an example\n\n<details>\n<summary>\nNo example found.\n</summary>\n\nSee [package layout](https://dart.dev/tools/pub/package-layout#examples) guidelines on how to add an example.\n</details>"
},
{
"id": "platform",
"title": "Platform support",
"grantedPoints": 20,
"maxPoints": 20,
"status": "passed",
"summary": "### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n* ✓ iOS\n* ✓ Windows\n* ✓ Linux\n* ✓ macOS\n* ✓ Web\n\n### [*] 0/0 points: WASM compatibility\n\nPackage is compatible with runtime `wasm`. See https://dart.dev/web/wasm for details."
"summary": "### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n* ✓ iOS\n* ✓ Windows\n* ✓ Linux\n* ✓ macOS\n* ✓ Web\n\n### [*] 0/0 points: WASM compatibility\n\nThis package is compatible with runtime `wasm`, and will be rewarded additional points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
7 changes: 5 additions & 2 deletions test/goldens/end2end/async-2.11.0.json_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ Detected license: `BSD-3-Clause`.

### [*] 10/10 points: 20% or more of the public API has dartdoc comments

246 out of 246 API elements (100.0 %) have documentation comments.
246 out of 263 API elements (93.5 %) have documentation comments.

Some symbols that are missing documentation: `async.AsyncMemoizer.AsyncMemoizer`, `async.ChunkedStreamReader.ChunkedStreamReader`, `async.DelegatingFuture.DelegatingFuture`, `async.DelegatingStream.DelegatingStream`, `async.ErrorResult.ErrorResult`.

### [x] 0/10 points: Package has an example

Expand All @@ -42,7 +44,8 @@ See [package layout](https://dart.dev/tools/pub/package-layout#examples) guideli

### [*] 0/0 points: WASM compatibility

Package is compatible with runtime `wasm`. See https://dart.dev/web/wasm for details.
This package is compatible with runtime `wasm`, and will be rewarded additional points in a future version of the scoring model.
See https://dart.dev/web/wasm for details.

## 50/50 Pass static analysis

Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/audio_service-0.18.10.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"grantedPoints": 20,
"maxPoints": 20,
"status": "failed",
"summary": "### [*] 20/20 points: Supports 4 of 6 possible platforms (**iOS**, **Android**, **Web**, Windows, **macOS**, Linux)\n\n* ✓ Android\n* ✓ iOS\n* ✓ macOS\n* ✓ Web\n\nThese platforms are not supported:\n\n<details>\n<summary>\nPackage does not support platform `Windows`.\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n</details>\n<details>\n<summary>\nPackage does not support platform `Linux`.\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n</details>\n\nThese issues are present but do not affect the score, because they may not originate in your package:\n\n<details>\n<summary>\nPackage does not support platform `Web`.\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/cache_info_repositories.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart` that imports:\n* `package:path_provider/path_provider.dart` that declares support for platforms: `Android`, `iOS`, `Windows`, `Linux`, `macOS`.\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\n<details>\n<summary>\nPackage not compatible with runtime wasm\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/web/web_helper.dart` that imports:\n* `package:flutter_cache_manager/src/cache_store.dart` that imports:\n* `package:flutter_cache_manager/src/storage/file_system/file_system.dart` that imports:\n* `package:file/file.dart` that imports:\n* `package:file/src/interface.dart` that imports:\n* `package:file/src/io.dart` that imports:\n* `dart:io`\n</details>\nSee https://dart.dev/web/wasm for details."
"summary": "### [*] 20/20 points: Supports 4 of 6 possible platforms (**iOS**, **Android**, **Web**, Windows, **macOS**, Linux)\n\n* ✓ Android\n* ✓ iOS\n* ✓ macOS\n* ✓ Web\n\nThese platforms are not supported:\n\n<details>\n<summary>\nPackage does not support platform `Windows`.\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n</details>\n<details>\n<summary>\nPackage does not support platform `Linux`.\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that declares support for platforms: `Android`, `iOS`, `macOS`, `Web`.\n</details>\n\nThese issues are present but do not affect the score, because they may not originate in your package:\n\n<details>\n<summary>\nPackage does not support platform `Web`.\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/cache_info_repositories.dart` that imports:\n* `package:flutter_cache_manager/src/storage/cache_info_repositories/json_cache_info_repository.dart` that imports:\n* `package:path_provider/path_provider.dart` that declares support for platforms: `Android`, `iOS`, `Windows`, `Linux`, `macOS`.\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\n<details>\n<summary>\nPackage not compatible with runtime wasm\n</summary>\n\nBecause:\n* `package:audio_service/audio_service.dart` that imports:\n* `package:flutter_cache_manager/flutter_cache_manager.dart` that imports:\n* `package:flutter_cache_manager/src/web/web_helper.dart` that imports:\n* `package:flutter_cache_manager/src/cache_store.dart` that imports:\n* `package:flutter_cache_manager/src/storage/file_system/file_system.dart` that imports:\n* `package:file/file.dart` that imports:\n* `package:file/src/interface.dart` that imports:\n* `package:file/src/io.dart` that imports:\n* `dart:io`\n</details>\nThis package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
1 change: 1 addition & 0 deletions test/goldens/end2end/audio_service-0.18.10.json_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Because:
* `package:file/src/io.dart` that imports:
* `dart:io`
</details>
This package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.
See https://dart.dev/web/wasm for details.

## 50/50 Pass static analysis
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/bulma_min-0.7.4.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"grantedPoints": 0,
"maxPoints": 20,
"status": "failed",
"summary": "### [x] 0/20 points: Platform support detection failed\n\n<details>\n<summary>\nCould not determine supported platforms as package resolution failed.\n</summary>\n\nRun `dart pub get` for more information.\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\nUnable to detect compatibility with runtime `wasm`.\nSee https://dart.dev/web/wasm for details."
"summary": "### [x] 0/20 points: Platform support detection failed\n\n<details>\n<summary>\nCould not determine supported platforms as package resolution failed.\n</summary>\n\nRun `dart pub get` for more information.\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\nUnable to detect compatibility with runtime `wasm`, and this package will not be rewarded full points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/bulma_min-0.7.4.json_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Run `dart pub get` for more information.

### [x] 0/0 points: WASM compatibility

Unable to detect compatibility with runtime `wasm`.
Unable to detect compatibility with runtime `wasm`, and this package will not be rewarded full points in a future version of the scoring model.
See https://dart.dev/web/wasm for details.

## 0/50 Pass static analysis
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/dnd-2.0.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"grantedPoints": 20,
"maxPoints": 20,
"status": "failed",
"summary": "### [*] 20/20 points: Supports 1 of 6 possible platforms (iOS, Android, **Web**, Windows, macOS, Linux)\n\n* ✓ Web\n\nThese platforms are not supported:\n\n<details>\n<summary>\nPackage not compatible with platform Android\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform iOS\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform Windows\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform Linux\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform macOS\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\n<details>\n<summary>\nPackage not compatible with runtime wasm\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\nSee https://dart.dev/web/wasm for details."
"summary": "### [*] 20/20 points: Supports 1 of 6 possible platforms (iOS, Android, **Web**, Windows, macOS, Linux)\n\n* ✓ Web\n\nThese platforms are not supported:\n\n<details>\n<summary>\nPackage not compatible with platform Android\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform iOS\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform Windows\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform Linux\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n<details>\n<summary>\nPackage not compatible with platform macOS\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\n<details>\n<summary>\nPackage not compatible with runtime wasm\n</summary>\n\nBecause:\n* `package:dnd/dnd.dart` that imports:\n* `dart:js`\n</details>\nThis package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
1 change: 1 addition & 0 deletions test/goldens/end2end/dnd-2.0.1.json_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Because:
* `package:dnd/dnd.dart` that imports:
* `dart:js`
</details>
This package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.
See https://dart.dev/web/wasm for details.

## 30/50 Pass static analysis
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/gg-1.0.12.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"grantedPoints": 20,
"maxPoints": 20,
"status": "failed",
"summary": "### [*] 20/20 points: Supports 5 of 6 possible platforms (**iOS**, **Android**, Web, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n* ✓ iOS\n* ✓ Windows\n* ✓ Linux\n* ✓ macOS\n\nThese platforms are not supported:\n\n<details>\n<summary>\nPackage not compatible with platform Web\n</summary>\n\nBecause:\n* `package:gg/gg.dart` that imports:\n* `package:gg/src/tools/checks.dart` that imports:\n* `package:gg_publish/gg_publish.dart` that imports:\n* `package:gg_publish/src/commands/publish.dart` that imports:\n* `package:gg_version/gg_version.dart` that imports:\n* `package:gg_version/src/commands/published_version.dart` that imports:\n* `package:gg_args/gg_args.dart` that imports:\n* `package:gg_args/src/missing_sub_commands.dart` that imports:\n* `dart:io`\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\n<details>\n<summary>\nPackage not compatible with runtime wasm\n</summary>\n\nBecause:\n* `package:gg/gg.dart` that imports:\n* `package:gg/src/tools/checks.dart` that imports:\n* `package:gg_publish/gg_publish.dart` that imports:\n* `package:gg_publish/src/commands/publish.dart` that imports:\n* `package:gg_version/gg_version.dart` that imports:\n* `package:gg_version/src/commands/published_version.dart` that imports:\n* `package:gg_args/gg_args.dart` that imports:\n* `package:gg_args/src/missing_sub_commands.dart` that imports:\n* `dart:io`\n</details>\nSee https://dart.dev/web/wasm for details."
"summary": "### [*] 20/20 points: Supports 5 of 6 possible platforms (**iOS**, **Android**, Web, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n* ✓ iOS\n* ✓ Windows\n* ✓ Linux\n* ✓ macOS\n\nThese platforms are not supported:\n\n<details>\n<summary>\nPackage not compatible with platform Web\n</summary>\n\nBecause:\n* `package:gg/gg.dart` that imports:\n* `package:gg/src/tools/checks.dart` that imports:\n* `package:gg_publish/gg_publish.dart` that imports:\n* `package:gg_publish/src/commands/publish.dart` that imports:\n* `package:gg_version/gg_version.dart` that imports:\n* `package:gg_version/src/commands/published_version.dart` that imports:\n* `package:gg_args/gg_args.dart` that imports:\n* `package:gg_args/src/missing_sub_commands.dart` that imports:\n* `dart:io`\n</details>\n\n### [x] 0/0 points: WASM compatibility\n\n<details>\n<summary>\nPackage not compatible with runtime wasm\n</summary>\n\nBecause:\n* `package:gg/gg.dart` that imports:\n* `package:gg/src/tools/checks.dart` that imports:\n* `package:gg_publish/gg_publish.dart` that imports:\n* `package:gg_publish/src/commands/publish.dart` that imports:\n* `package:gg_version/gg_version.dart` that imports:\n* `package:gg_version/src/commands/published_version.dart` that imports:\n* `package:gg_args/gg_args.dart` that imports:\n* `package:gg_args/src/missing_sub_commands.dart` that imports:\n* `dart:io`\n</details>\nThis package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
1 change: 1 addition & 0 deletions test/goldens/end2end/gg-1.0.12.json_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Because:
* `package:gg_args/src/missing_sub_commands.dart` that imports:
* `dart:io`
</details>
This package is not compatible with runtime `wasm`, and will not be rewarded full points in a future version of the scoring model.
See https://dart.dev/web/wasm for details.

## 50/50 Pass static analysis
Expand Down
2 changes: 1 addition & 1 deletion test/goldens/end2end/http-0.13.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"grantedPoints": 20,
"maxPoints": 20,
"status": "passed",
"summary": "### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n* ✓ iOS\n* ✓ Windows\n* ✓ Linux\n* ✓ macOS\n* ✓ Web\n\n### [*] 0/0 points: WASM compatibility\n\nPackage is compatible with runtime `wasm`. See https://dart.dev/web/wasm for details."
"summary": "### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **macOS**, **Linux**)\n\n* ✓ Android\n* ✓ iOS\n* ✓ Windows\n* ✓ Linux\n* ✓ macOS\n* ✓ Web\n\n### [*] 0/0 points: WASM compatibility\n\nThis package is compatible with runtime `wasm`, and will be rewarded additional points in a future version of the scoring model.\nSee https://dart.dev/web/wasm for details."
},
{
"id": "analysis",
Expand Down
Loading

0 comments on commit 19d3b0c

Please sign in to comment.