pub-dev
pub-dev copied to clipboard
Cannot make package that is both a flutter plugin, and has a dart-only side also
I recently published an update to the package https://pub.dev/packages/minigpu. Before this update, I was using plugins for all platforms, but with 1.0.1 I migrated the library to use native assets. Now that I have published this version, only web shows up for compatibility per the pub.dev analyzer.
This package should show as dart compatible and support all native platforms + web. I am only using a plugin now for web, native assets use the new build hook.
Is there any way to force this until recognition of native assets can be added to the analyzer?
cc: @dcharkes
This is a known issue, cc @jonasfj
Somewhat related, also about surfacing supported platforms from hooks:
- https://github.com/dart-lang/pub-dev/issues/8010
You can override the detected list of supported platforms by explicitly declaring them: https://pub.dev/help/scoring#:~:text=Declaring%20platforms%3A
You can override the detected list of supported platforms by explicitly declaring them: https://pub.dev/help/scoring#:~:text=Declaring%20platforms%3A
Thanks! Any way to specifically declare dart compatibility too?
No, we haven't yet figured out how to make packages that are flutter plugins sometimes and dart ffi apps sometimes.
Currently the best (but perhaps unsatisfying) advice is to make two separate plugins.
No, we haven't yet figured out how to make packages that are flutter plugins sometimes and dart ffi apps sometimes.
It seems the main hold-up on this is the analyzer forcing the use of flutter pub get when a nested dep relies on a flutter package. If the nested check was disabled or a flag to disable it was introduced, wouldn't these flow as dart packages?
Yes my package nests a web dependency that relies on flutter, native never uses this package so it is never called and should validate as dart.