Skip to content

[Feature] Exclude supports for certain platform #4602

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

Closed
Sunbreak opened this issue Mar 12, 2021 · 6 comments
Closed

[Feature] Exclude supports for certain platform #4602

Sunbreak opened this issue Mar 12, 2021 · 6 comments

Comments

@Sunbreak
Copy link

Sunbreak commented Mar 12, 2021

https://pub.dev/packages/libusb supports only Windows/macOS/Linux

Could we exclude the TAGs of Android/iOS?

Screen Shot 2021-03-12 at 3 49 09 PM

BTW: libusb is a Dart package, neither Flutter plugin nor Flutter package. None of it dependency declared something like:

flutter:
  plugin:
    platforms:
      android: xxx
      ios: xxx
@isoos
Copy link
Collaborator

isoos commented Mar 12, 2021

@Sunbreak: can you think of any intrinsic property inside the package that we can detect and could suggest us that it supports desktop platforms only?

@Sunbreak
Copy link
Author

Maybe something like:

dart:
  native:
    platforms: [windows, linux, macos]

@isoos
Copy link
Collaborator

isoos commented Mar 12, 2021

@Sunbreak: I was thinking if there is in the code, the dependencies, in the layout of the project or in the content of the files that necessarily excludes mobile platforms. We tend to prefer inferring these as opposed to requiring to specify explicitly.

@Sunbreak
Copy link
Author

Sunbreak commented Mar 12, 2021

libusb is quite basical. It only depends on the libusb-1.0.dll/dylib/so

I don't think it could be inferred from the code, the dependencies or the layout of the project. pubspec.yaml is the only thing comes up with

@stuartmorgan-g
Copy link

In general, there's unlikely to be a way to detect platform limitation of a package whose limitation comes from either FFI or Process calls.

@sigurdm
Copy link
Contributor

sigurdm commented Jan 27, 2022

This has been fixed in pana already, and will show up in a coming pub release.

Closing as a duplicate of dart-lang/pana#889

@sigurdm sigurdm closed this as completed Jan 27, 2022
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

4 participants