My app's CI/CD has been working for over 6 months, today I got below on master branch:
Running "flutter pub get" in s... 24.0s
Invalid plugin specification moor_ffi.
Cannot find the `flutter.plugin.platforms` key in the `pubspec.yaml` file. An instruction to format the `pubspec.yaml` can be found here: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms
Did we have any breaking change I'm not aware?
I got "unblocked" by checkout out yesterday's code:
git checkout adc9dde3ba8563eebb824feb689f95eb947ab745
So probably something added today broke the build.
Upgraded to Flutter version 1.21.0-2.0.pre.114 and its failing with same error
Something's missing in the plugin pubsec.yaml because the pub.dev for moor_ffi does not show platforms either
I downgraded Flutter and confirm its working.. so some sort of incompatibilty with latest flutter version
This is an unfortunate situation moor can't do too much about:
moor_ffi can't depend on Flutter since it's a pure Dart package that needs to work without Flutterflutter.plugins.platforms key, pub forbids uploads without adding an explicit dependency on FlutterThe solution is to phase out the moor_ffi package in favor of a better setup, see #691. If you want to support the latest master version of Flutter, you can do this:
sqlite3_flutter_libs packagemoor_ffi dependency and replace imports with the new package:moor/ffi.dart libraryYou'll also need to use the latest development version of moor:
dependency_overrides:
moor:
git:
url: https://github.com/simolus3/moor.git
ref: develop
path: moor
Please let me know if you run into any issues with this approach, thanks!
@simolus3 @NightOwlCoder This is pubspec I've got for the moor_ffi plugin when I fetch the plugin from pub.
https://github.com/simolus3/moor/blame/2332c58742ec0de304385548e4900878643f8b29/moor_ffi/pubspec.yaml#L24-L28
I think removing the plugin section in the pubspec will solve the issue.
@simolus3 your suggestion worked fine.
CI/CD successful, and so far I can detect any issue with the app itself.
I come over from this issue.
@simolus3 When will this be fixed?
This will be fixed in the next moor version. You can also take a look at the migration guide from this comment to use this now.
This will be fixed in the next moor version. You can also take a look at the migration guide from this comment to use this now.
I am looking forward to your updates, please let me know when all done. Thx.
I hope you would fix it ASAP, Thanks 馃檹馃徑
@simolus3 Your July 23 comment above got me back on the air, hence closing #733. Thanks.
I just published moor version 3.3.0 and moor_ffi version 0.8.0.
You can upgrade moor_ffi to fix this problem now, but I recommend migrating to the new package:moor/ffi.dart library. With moor 3.3.0, you can remove the dependency_override. The changelog of moor_ffi contains more information on this, but feel free to open an issue if you run into problems when upgrading.
@simolus3 This bug is fixed, thanks.
Most helpful comment
I just published
moorversion 3.3.0 andmoor_ffiversion 0.8.0.You can upgrade
moor_ffito fix this problem now, but I recommend migrating to the newpackage:moor/ffi.dartlibrary. Withmoor3.3.0, you can remove thedependency_override. The changelog ofmoor_fficontains more information on this, but feel free to open an issue if you run into problems when upgrading.