dart-lang / pana

Package ANAlysis for Dart
https://pub.dev/packages/pana
BSD 3-Clause "New" or "Revised" License
204 stars 44 forks source link

Searching for non-flutter packages gives mainly flutter packages #1290

Closed sigurdm closed 10 months ago

sigurdm commented 10 months ago

With the query "-sdk:flutter" We get this: image

Something seems to be broken somewhere

isoos commented 10 months ago

Interesting, the first hit has the following tags:

"tags": [
      "is:flutter-favorite",
      "publisher:fluttercommunity.dev",
      "platform:android",
      "platform:ios",
      "platform:windows",
      "platform:linux",
      "platform:macos",
      "platform:web",
      "is:plugin",
      "is:null-safe",
      "is:dart3-compatible",
      "license:bsd-3-clause",
      "license:fsf-libre",
      "license:osi-approved"
    ],

the platform tags are probably awarded because of the pubspec:

flutter:
  plugin:
    platforms:
      android:
        package: dev.fluttercommunity.plus.share
        pluginClass: SharePlusPlugin
      ios:
        pluginClass: FPPSharePlusPlugin
      linux:
        dartPluginClass: SharePlusLinuxPlugin
      macos:
        pluginClass: SharePlusMacosPlugin
      web:
        pluginClass: SharePlusWebPlugin
        fileName: src/share_plus_web.dart
      windows:
        dartPluginClass: SharePlusWindowsPlugin
        pluginClass: SharePlusWindowsPluginCApi

not yet sure why sdk:flutter was missing though...

isoos commented 10 months ago

One conflict I've found so far that explains why the package doesn't get sdk:flutter tag:

Package is not compatible with the Flutter SDK. Because:
* `package:share_plus/share_plus.dart` that imports:
* `package:share_plus/src/share_plus_web.dart` that imports:
* `package:url_launcher_web/url_launcher_web.dart` that imports:
* `package:url_launcher_web/src/link.dart` that imports:
* `dart:ui_web`
isoos commented 10 months ago

1259 added ui_web, but only for the platform detection library list, we need to add it to the SDK detection too.