Skip to content
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

pana fails checking the screenshots #1180

Closed
Tkko opened this issue Dec 19, 2022 · 4 comments
Closed

pana fails checking the screenshots #1180

Tkko opened this issue Dec 19, 2022 · 4 comments

Comments

@Tkko
Copy link

Tkko commented Dec 19, 2022

Details:
Package: https://pub.dev/packages/pinput
pana version: 0.21.23

Steps to reproduce:

  1. Add pinnput_demo.webp to root directory

  2. Add screenshots field in pubspec.yaml

screenshots:
  - description: 'This screenshot shows the possible Pinput examples'
    path: pinput_demo.webp
  1. Run:
    flutter packages pub global run pana --exit-code-threshold=0 --no-warning --source path ./

Output:

INFO       Running `/Users/dev/fvm/versions/stable/bin/cache/dart-sdk/bin/dart --version`...
INFO       Running `flutter --no-version-check --version --machine`...
INFO       Running `git rev-parse --show-toplevel`...
INFO       Running `flutter --no-version-check pub pub get --no-example`...
INFO       Running `flutter --no-version-check pub pub get --no-example`...
INFO       Running `flutter --no-version-check pub pub outdated --json --up-to-date --no-dev-dependencies --no-dependency-overrides`...
INFO       Analyzing package...
INFO       Running `/Users/dev/fvm/versions/stable/bin/cache/dart-sdk/bin/dart analyze --format machine lib`...
INFO       Running `webpinfo /private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp`...
'webpinfo' tool not found.INFO       Running `cwebp /private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp -o /var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/bcj2fn/gen/pinput_demo.webp`...
'cwebp' tool not found.INFO       Running `gif2webp /private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp -o /var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/bcj2fn/gen/pinput_demo.webp`...
'gif2webp' tool not found.INFO       Running `git init`...
INFO       Running `git remote add origin https://github.com/Tkko/Flutter_PinPut`...
INFO       Running `git remote show origin`...
INFO       Running `git fetch --depth 1 --no-recurse-submodules origin master`...
INFO       Running `git ls-tree -r --name-only --full-tree origin/master`...
INFO       Running `git show origin/master:example/pubspec.yaml`...
INFO       Running `git show origin/master:pubspec.yaml`...
INFO       Running `flutter --no-version-check format --output=none --set-exit-if-changed /private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./lib`...

## ✗ Follow Dart file conventions (20 / 30)
### [x] 0/10 points: Provide a valid `pubspec.yaml`

<details>
<summary>
Funding URL doesn't exist.
</summary>

At the time of the analysis `https://www.buymeacoffee.com/fman` was unreachable. Make sure that the website is reachable via [`HEAD`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) requests.
</details>

### [*] 5/5 points: Provide a valid `README.md`


### [*] 5/5 points: Provide a valid `CHANGELOG.md`


### [*] 10/10 points: Use an OSI-approved license

Detected license: `MIT`.

## ✗ Provide documentation (0 / 10)
### [x] 0/10 points: Package has an example and has no issues with screenshots

Found 4 issues. Showing the first 2:

* `/private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp`: Tried interpreting screenshot as WebP with `webpinfo "/private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp"` failed with _exit code_ `2`.
* `/private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp`: Converting screenshot with `cwebp "/private/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/pana_gTPQxo/./pinput_demo.webp" -o "/var/folders/zx/9tt6jbqs325_fctz25tn65h80000gn/T/bcj2fn/gen/pinput_demo.webp"` failed with _exit code_ `2`.

## ✓ Platform support (20 / 20)
### [*] 20/20 points: Supports 6 of 6 possible platforms (**iOS**, **Android**, **Web**, **Windows**, **MacOS**, **Linux**)

* ✓ Android
* ✓ iOS
* ✓ Windows
* ✓ Linux
* ✓ MacOS
* ✓ Web

## ✓ Pass static analysis (30 / 30)
### [*] 30/30 points: code has no errors, warnings, lints, or formatting issues


## ✓ Support up-to-date dependencies (20 / 20)
### [*] 10/10 points: All of the package dependencies are supported in the latest version

|Package|Constraint|Compatible|Latest|
|:-|:-|:-|:-|
|[`flutter`]|`flutter`|0.0.0|0.0.0|
|[`smart_auth`]|`^1.0.6`|1.0.6|1.0.6|

<details><summary>Transitive dependencies</summary>

|Package|Constraint|Compatible|Latest|
|:-|:-|:-|:-|
|[`characters`]|-|1.2.1|1.2.1|
|[`collection`]|-|1.16.0|1.17.0|
|[`flutter_web_plugins`]|-|0.0.0|0.0.0|
|[`js`]|-|0.6.4|0.6.6|
|[`material_color_utilities`]|-|0.1.5|0.2.0|
|[`meta`]|-|1.8.0|1.8.0|
|[`sky_engine`]|-|0.0.99|0.0.99|
|[`vector_math`]|-|2.1.2|2.1.4|
</details>

To reproduce run `dart pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides`.

[`flutter`]: https://pub.dev/packages/flutter
[`smart_auth`]: https://pub.dev/packages/smart_auth
[`characters`]: https://pub.dev/packages/characters
[`collection`]: https://pub.dev/packages/collection
[`flutter_web_plugins`]: https://pub.dev/packages/flutter_web_plugins
[`js`]: https://pub.dev/packages/js
[`material_color_utilities`]: https://pub.dev/packages/material_color_utilities
[`meta`]: https://pub.dev/packages/meta
[`sky_engine`]: https://pub.dev/packages/sky_engine
[`vector_math`]: https://pub.dev/packages/vector_math


### [*] 10/10 points: Package supports latest stable Dart and Flutter SDKs


## ✓ Support sound null safety (20 / 20)
### [*] 20/20 points: Package and dependencies are fully migrated to null safety!


Points: 110/130.
@isoos
Copy link
Collaborator

isoos commented Dec 19, 2022

I think you don't have the webp command line tools installed. On Debian/Ubuntu it is done via apt install webp.

@Tkko
Copy link
Author

Tkko commented Dec 19, 2022

Thanks, that's correct, the message wasn't clear though

@Tkko Tkko closed this as completed Dec 19, 2022
@isoos
Copy link
Collaborator

isoos commented Dec 19, 2022

@szakarias: can we easily detect if the tools are installed?

@sigurdm
Copy link
Contributor

sigurdm commented Dec 19, 2022

I think we are detecting this:

stderr.write("'${cmdAndArgs[0]}' tool not found.");
.
We should probably use writeln instead of write.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants