Skip to content

How to resolve missed platform classifications? #858

@isoos

Description

@isoos

We have a couple of interesting cases open:

The common theme in all of these is the difference between the use of the library and the target platform of the app that is built using it.

I can see a couple of ways to go ahead:

1. No action in the classification.

There are packages that do provide build and code generation utilities, and are not mis-categorized (e.g. pwa generates code, but all of that lives in bin/, so there is no hint that it would be a server package).

If we identify these patterns, and give guidance to package authors, eventually most of these will be corrected.

Related questions:

  • What is the ideal pattern (besides hiding the dart:io code in bin/)?
  • Shall we add a suggestion for it in pana (e.g. detecting somebody relies on source_gen)?

2. Metadata from pubspec.yaml.

Keywords (#368), categories (#367) or a property for platforms could be coming from pubspec.yaml, and the UI could display it along the ones we are detecting.

Related questions:

  • How to display them if they are not the same? (colors, format, order, icon.. ?)
  • Which of it takes preference (e.g. in search)?
  • Should this affect the score or ranking in any way?

3. Hand-coded exception in the pana analysis.

We could assume that if a library uses certain helper libraries (through transitive dependencies), than it is a build-utility or a nodejs library. If/when dart:io is used only through them, the package could be classified as generic, unless other API use restrict it.

Related questions:

  • Is it the case really that if something is a build tool, it can be applied to every platform? I can't think of a counter-example, but there may be one.
  • Shall we put NodeJs support in a different category? It is an outlier compared to the build tools.

4. New platform for build utilities.

We could also introduce a new platform, that is exclusively build- or other toolchain-related utilities. These packages could be listed for Flutter or web too, but would be bearing the tool or build or something similar platform label.

Related questions:

  • Is it really a platform, or a sub-platform / category?
  • NodeJs is still an outlier here, same question for a different category.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions