Moor: CI/CD failing with: Invalid plugin specification moor_ffi

Created on 23 Jul 2020  路  14Comments  路  Source: simolus3/moor

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?

Most helpful comment

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.

All 14 comments

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 Flutter
  • When using the new flutter.plugins.platforms key, pub forbids uploads without adding an explicit dependency on Flutter

The 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:

  • add a dependency on the new sqlite3_flutter_libs package
  • drop the moor_ffi dependency and replace imports with the new package:moor/ffi.dart library

You'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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kira1752 picture kira1752  路  3Comments

jerryzhoujw picture jerryzhoujw  路  4Comments

Holofox picture Holofox  路  4Comments

KKRoko picture KKRoko  路  3Comments

Beloin picture Beloin  路  4Comments