You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should also detect "web". I think there is a problem with detecting the supported platform when conditional imports are used.
Correct, there is a bug here.
We are looking into refactoring the platform detection in pana soon, but I'm not sure this will get fixed. For now there is few packages that uses conditional imports, and they have special handling in pana 🙈
This file is not part of the hive library but it is imported.
As the storage_backend.dart is imported in the main library, I think we should probably adjust the component detection in pana (to also detect these in conditional exports), but with the current logic after that, it will classify them as conflicting components, and the package will be marked as "platform conflict". I think we should keep this issue open, and we'll deal with it as we go ahead with the rewrite/refactoring of the platform classification.
Activity
jonasfj commentedon Sep 12, 2019
Correct, there is a bug here.
We are looking into refactoring the platform detection in pana soon, but I'm not sure this will get fixed. For now there is few packages that uses conditional imports, and they have special handling in
pana🙈https://github.com/dart-lang/pana/blob/aaa9afa7000a2064678e2339f1d0a3cb4d79b7f3/lib/src/package_analyzer.dart#L264-L269
simc commentedon Sep 12, 2019
Should I open an issue for pana too?
isoos commentedon Sep 12, 2019
@leisim: in which of your libraries are you using the conditional import? Could you please link to it? Is it reachable from
package:hive/hive.dart?simc commentedon Sep 12, 2019
@isoos
The library is hive and here is the file with the conditional import. This file is not part of the
hivelibrary but it is imported.isoos commentedon Sep 12, 2019
As the
storage_backend.dartis imported in the main library, I think we should probably adjust the component detection in pana (to also detect these in conditional exports), but with the current logic after that, it will classify them as conflicting components, and the package will be marked as "platform conflict". I think we should keep this issue open, and we'll deal with it as we go ahead with the rewrite/refactoring of the platform classification.yjbanov commentedon Sep 13, 2019
See also: flutter/flutter#35588
jonasfj commentedon Aug 4, 2020
I think this is fixed now, please reopen if not.