OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
603 stars 40 forks source link

5.0.5 does not build for Android #90

Closed jel-atolcd closed 7 months ago

jel-atolcd commented 7 months ago

Describe the bug

5.0.5 doesn't build for Android. 4.0.0-beta1 neither. 3.0.7 works fine.

Error is:

e: file:///home/jel-atolcd/Documents/AwesomeProject/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt:5:46 Unresolved reference: FrameworkAPI
e: file:///home/jel-atolcd/Documents/AwesomeProject/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt:7:8 Unresolved reference: FrameworkAPI
e: file:///home/jel-atolcd/Documents/AwesomeProject/node_modules/@op-engineering/op-sqlite/android/src/main/java/com/op/sqlite/OPSQLiteBridge.kt:7:8 An annotation argument must be a compile-time constant

FAILURE: Build failed with an exception.

Versions:

Reproducible example

Basic example from RN doc does not build:

npx react-native@0.72.7 init AwesomeProject --version 0.72.7
npm i -s @op-engineering/op-sqlite

Sources available here: https://github.com/jel-atolcd/op-sqlite-issue

Thanks

ospfranco commented 7 months ago

Package is no longer compatible with < 0.73. The move to bridgeless breaks a lot of code and the FrameworkAPI annotation is necessary for the code to compile.

jel-atolcd commented 7 months ago

OK, it would be nice to add the info in the doc then. And update the dependency of the package. Thanks for the answer.

ospfranco commented 7 months ago

true, I will take care of it.

francescotescari commented 7 months ago

Is there a version that is compatible with RN 0.71.14 (new arch disabled)? IIUC from now on this library will support only RN >= 0.73. Is that right?

+1 on documenting RN compatibility

Thanks!

ospfranco commented 7 months ago

version 3.0.x should be compatible but newer versions are not. It's just too much work supporting old versions.

francescotescari commented 7 months ago

Does moving to bridgeless mean that in order to use op-sqlite we will have to enable the new architecture too?

ospfranco commented 7 months ago

No, it will work with both