diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74b05224..fb1c03a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: timeout-minutes: 10 container: - image: dart:2.19.3 + image: dart:3.3.0 steps: - name: Check out code @@ -35,7 +35,7 @@ jobs: timeout-minutes: 10 container: - image: dart:2.19.3 + image: dart:3.3.0 steps: - name: Check out code diff --git a/example/android/build.gradle b/example/android/build.gradle index 36e820e1..68230ee9 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -24,6 +24,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index b8793d3c..6b665338 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/example/lib/main.dart b/example/lib/main.dart index 8ebd498e..bed0fcd0 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -100,6 +100,7 @@ class TasksWidgetState extends State { } TaskStatus _getMenuType(int index) => TaskStatus.values[index - 1]; + } class TasksListView extends StatelessWidget { diff --git a/example/pubspec.lock b/example/pubspec.lock index e0d64796..ad812b07 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: a36ec4843dc30ea6bf652bf25e3448db6c5e8bcf4aa55f063a5d1dad216d8214 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "58.0.0" + version: "67.0.0" analyzer: dependency: "direct dev" description: name: analyzer - sha256: cc4242565347e98424ce9945c819c192ec0838cb9d1f6aa4a97cc96becbc5b27 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.10.0" + version: "6.4.1" args: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: transitive description: @@ -61,26 +61,26 @@ packages: dependency: transitive description: name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.8" build_runner_core: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" charcode: dependency: transitive description: @@ -141,18 +141,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.0" collection: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" convert: dependency: transitive description: @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352" + sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.4" fake_async: dependency: transitive description: @@ -304,6 +304,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lists: dependency: transitive description: @@ -324,26 +348,26 @@ packages: dependency: transitive description: name: matcher - sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.14" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.0" mime: dependency: transitive description: @@ -364,10 +388,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pool: dependency: transitive description: @@ -380,10 +404,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: @@ -417,74 +441,74 @@ packages: dependency: transitive description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.5.0" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqflite: dependency: transitive description: name: sqflite - sha256: "500d6fec583d2c021f2d25a056d96654f910662c64f836cd2063167b8f1fa758" + sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 url: "https://pub.dev" source: hosted - version: "2.2.6" + version: "2.3.2" sqflite_common: dependency: transitive description: name: sqflite_common - sha256: "963dad8c4aa2f814ce7d2d5b1da2f36f31bd1a439d8f27e3dc189bb9d26bc684" + sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.5.3" sqflite_common_ffi: dependency: transitive description: name: sqflite_common_ffi - sha256: "0595da0b418deff5a93a20e15811e73ea1bbce89745eeebed87c37f8027b7a5d" + sha256: "754927d82de369a6b9e760fb60640aa81da650f35ffd468d5a992814d6022908" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.2+1" sqlite3: dependency: transitive description: name: sqlite3 - sha256: a3ba4b66a7ab170ce7aa3f5ac43c19ee8d6637afbe7b7c95c94112b4f4d91566 + sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "2.4.0" sqlparser: dependency: transitive description: name: sqlparser - sha256: "91f47610aa54d8abf9d795a7b4e49b2a788f65d7493d5a68fbf180c3cbcc6f38" + sha256: dc384bb1f56d1384ce078edb5ff8247976abdab79d0c83e437210c85f06ecb61 url: "https://pub.dev" source: hosted - version: "0.27.0" + version: "0.34.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -505,10 +529,10 @@ packages: dependency: transitive description: name: strings - sha256: "5af86299505c299640f5564e187c1a2ee9d6308c540e8d65f6385f5c67019122" + sha256: "1f3db7347b8dfd9844ee7fb34883cffbe6cc723a63cb9f4a0aa19e619304b030" url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "3.0.0" synchronized: dependency: transitive description: @@ -529,10 +553,10 @@ packages: dependency: transitive description: name: test_api - sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.4.18" + version: "0.6.1" timing: dependency: transitive description: @@ -565,14 +589,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -590,5 +622,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.2.6 <4.0.0" + flutter: ">=3.7.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index aadfdf8f..9ce5f914 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -7,7 +7,7 @@ homepage: https://pinchbv.github.io/floor/ publish_to: none environment: - sdk: '>=2.17.0 <3.0.0' + sdk: '>=3.2.6 <4.0.0' dependencies: floor: @@ -16,8 +16,8 @@ dependencies: sdk: flutter dev_dependencies: - analyzer: ^5.0.0 - build_runner: ^2.2.1 + analyzer: ^6.4.1 + build_runner: ^2.4.8 floor_generator: path: ../floor_generator/ flutter_test: diff --git a/floor/lib/src/sqflite_database_factory.dart b/floor/lib/src/sqflite_database_factory.dart index dc6f1bdf..89a48bd7 100644 --- a/floor/lib/src/sqflite_database_factory.dart +++ b/floor/lib/src/sqflite_database_factory.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:path/path.dart'; +// ignore: unnecessary_import import 'package:sqflite/sqflite.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart'; diff --git a/floor/pubspec.lock b/floor/pubspec.lock index 85d4fe9c..e7b7661a 100644 --- a/floor/pubspec.lock +++ b/floor/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: a36ec4843dc30ea6bf652bf25e3448db6c5e8bcf4aa55f063a5d1dad216d8214 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "58.0.0" + version: "67.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: cc4242565347e98424ce9945c819c192ec0838cb9d1f6aa4a97cc96becbc5b27 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.10.0" + version: "6.4.1" args: dependency: transitive description: @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: transitive description: @@ -61,26 +61,26 @@ packages: dependency: transitive description: name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.0.0" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.8" build_runner_core: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" charcode: dependency: transitive description: @@ -141,18 +141,18 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.0" collection: dependency: "direct main" description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" convert: dependency: transitive description: @@ -173,10 +173,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352" + sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.4" fake_async: dependency: transitive description: @@ -212,18 +212,16 @@ packages: floor_annotation: dependency: "direct main" description: - name: floor_annotation - sha256: fa3fa4f198cdd1d922a69ceb06e54663fe59256bf1cb3c036eff206b445a6960 - url: "https://pub.dev" - source: hosted + path: "../floor_annotation" + relative: true + source: path version: "1.4.2" floor_generator: dependency: "direct dev" description: - name: floor_generator - sha256: "40aaf1b619adc03367ce4b7c79161e3198d43b572b5ec9cc99a4a89de27b08d2" - url: "https://pub.dev" - source: hosted + path: "../floor_generator" + relative: true + source: path version: "1.4.2" flutter: dependency: "direct main" @@ -299,6 +297,30 @@ packages: url: "https://pub.dev" source: hosted version: "4.8.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: cdd14e3836065a1f6302a236ec8b5f700695c803c57ae11a1c84df31e6bcf831 + url: "https://pub.dev" + source: hosted + version: "10.0.3" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9b2ef90589911d665277464e0482b209d39882dffaaf4ef69a3561a3354b2ebc" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: fd3cd66cb2bcd7b50dcd3b413af49d78051f809c8b3f6e047962765c15a0d23d + url: "https://pub.dev" + source: hosted + version: "3.0.0" lists: dependency: transitive description: @@ -319,26 +341,26 @@ packages: dependency: "direct dev" description: name: matcher - sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.14" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.8.0" meta: dependency: "direct main" description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.0" mime: dependency: transitive description: @@ -351,10 +373,10 @@ packages: dependency: "direct dev" description: name: mockito - sha256: dd61809f04da1838a680926de50a9e87385c1de91c6579629c3d1723946e8059 + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.4.4" package_config: dependency: transitive description: @@ -367,10 +389,10 @@ packages: dependency: "direct main" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pool: dependency: transitive description: @@ -383,10 +405,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: @@ -420,74 +442,74 @@ packages: dependency: transitive description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.5.0" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" sqflite: dependency: "direct main" description: name: sqflite - sha256: "500d6fec583d2c021f2d25a056d96654f910662c64f836cd2063167b8f1fa758" + sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6 url: "https://pub.dev" source: hosted - version: "2.2.6" + version: "2.3.2" sqflite_common: dependency: "direct dev" description: name: sqflite_common - sha256: "220831bf0bd5333ff2445eee35ec131553b804e6b5d47a4a37ca6f5eb66e282c" + sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.5.3" sqflite_common_ffi: dependency: "direct main" description: name: sqflite_common_ffi - sha256: "0595da0b418deff5a93a20e15811e73ea1bbce89745eeebed87c37f8027b7a5d" + sha256: "754927d82de369a6b9e760fb60640aa81da650f35ffd468d5a992814d6022908" url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.3.2+1" sqlite3: dependency: transitive description: name: sqlite3 - sha256: a3ba4b66a7ab170ce7aa3f5ac43c19ee8d6637afbe7b7c95c94112b4f4d91566 + sha256: "072128763f1547e3e9b4735ce846bfd226d68019ccda54db4cd427b12dfdedc9" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "2.4.0" sqlparser: dependency: "direct main" description: name: sqlparser - sha256: "91f47610aa54d8abf9d795a7b4e49b2a788f65d7493d5a68fbf180c3cbcc6f38" + sha256: "7b20045d1ccfb7bc1df7e8f9fee5ae58673fce6ff62cefbb0e0fd7214e90e5a0" url: "https://pub.dev" source: hosted - version: "0.27.0" + version: "0.34.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -508,10 +530,10 @@ packages: dependency: transitive description: name: strings - sha256: "5af86299505c299640f5564e187c1a2ee9d6308c540e8d65f6385f5c67019122" + sha256: b33f40c4dd3e597bf6d9e7f4f4dc282dad0f19b07d9f320cb5c2183859cbccf5 url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "3.1.1" synchronized: dependency: transitive description: @@ -532,10 +554,10 @@ packages: dependency: transitive description: name: test_api - sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.4.18" + version: "0.7.0" timing: dependency: transitive description: @@ -568,14 +590,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: a2662fb1f114f4296cf3f5a50786a2d888268d7776cf681aa17d660ffa23b246 + url: "https://pub.dev" + source: hosted + version: "14.0.0" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -593,5 +623,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.2.6 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/floor/pubspec.yaml b/floor/pubspec.yaml index 2b1761d4..f1a22f66 100644 --- a/floor/pubspec.yaml +++ b/floor/pubspec.yaml @@ -9,26 +9,26 @@ issue_tracker: https://github.com/pinchbv/floor/issues publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=3.2.6 <4.0.0' dependencies: - collection: ^1.15.0 + collection: ^1.18.0 floor_annotation: path: ../floor_annotation flutter: sdk: flutter - meta: ^1.7.0 - path: ^1.8.1 - sqflite: ^2.0.0+4 - sqflite_common_ffi: ^2.0.0+3 - sqlparser: ^0.27.0 + meta: + path: ^1.9.0 + sqflite: ^2.3.2 + sqflite_common_ffi: ^2.3.2+1 + sqlparser: ^0.34.0 dev_dependencies: - build_runner: ^2.1.2 + build_runner: ^2.4.8 floor_generator: path: ../floor_generator flutter_test: sdk: flutter - matcher: ^0.12.10 - mockito: ^5.0.15 - sqflite_common: ^2.4.4 + matcher: ^0.12.16+1 + mockito: ^5.4.4 + sqflite_common: ^2.5.3 \ No newline at end of file diff --git a/floor_annotation/lib/src/entity.dart b/floor_annotation/lib/src/entity.dart index 5573715b..843ab1be 100644 --- a/floor_annotation/lib/src/entity.dart +++ b/floor_annotation/lib/src/entity.dart @@ -7,16 +7,16 @@ class Entity { final String? tableName; /// List of indices on the table. - final List indices; + final List? indices; /// List of [ForeignKey] constraints on this entity. - final List foreignKeys; + final List? foreignKeys; /// List of primary key column names. - final List primaryKeys; + final List? primaryKeys; /// Whether the table is a "WITHOUT ROWID table". - final bool withoutRowid; + final bool? withoutRowid; /// Marks a class as a database entity (table). const Entity({ diff --git a/floor_annotation/pubspec.lock b/floor_annotation/pubspec.lock index 91d69e7d..646b6b43 100644 --- a/floor_annotation/pubspec.lock +++ b/floor_annotation/pubspec.lock @@ -5,9 +5,9 @@ packages: dependency: "direct main" description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.12.0" sdks: - dart: ">=2.12.0 <4.0.0" + dart: ">=3.2.6 <4.0.0" diff --git a/floor_annotation/pubspec.yaml b/floor_annotation/pubspec.yaml index 1a5e4062..d97bdada 100644 --- a/floor_annotation/pubspec.yaml +++ b/floor_annotation/pubspec.yaml @@ -8,7 +8,7 @@ repository: https://github.com/pinchbv/floor issue_tracker: https://github.com/pinchbv/floor/issues environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=3.2.6 <4.0.0' dependencies: - meta: ^1.7.0 + meta: diff --git a/floor_generator/lib/misc/extension/string_extension.dart b/floor_generator/lib/misc/extension/string_extension.dart index e7d87f95..bafb0600 100644 --- a/floor_generator/lib/misc/extension/string_extension.dart +++ b/floor_generator/lib/misc/extension/string_extension.dart @@ -55,7 +55,7 @@ extension NullableStringExtension on String? { if (this == null) { return 'null'; } else { - return "'${escape(this!)}'"; + return "'${this!.toEscaped()}'"; } } } diff --git a/floor_generator/pubspec.lock b/floor_generator/pubspec.lock index 3916ef11..11d7e444 100644 --- a/floor_generator/pubspec.lock +++ b/floor_generator/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: a36ec4843dc30ea6bf652bf25e3448db6c5e8bcf4aa55f063a5d1dad216d8214 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "58.0.0" + version: "67.0.0" analyzer: dependency: "direct main" description: name: analyzer - sha256: cc4242565347e98424ce9945c819c192ec0838cb9d1f6aa4a97cc96becbc5b27 + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.10.0" + version: "6.4.1" args: dependency: transitive description: @@ -45,10 +45,10 @@ packages: dependency: "direct main" description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: "direct main" description: @@ -61,18 +61,18 @@ packages: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.2" build_test: dependency: "direct dev" description: name: build_test - sha256: "927ef98b58c5603ec58923c0bb943a74743e58149732665885bb1eb92983befe" + sha256: "260dbba934f41b0a42935e9cae1f5731b94f0c3e489dc97bcf8e281265aaa5ae" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.2.2" built_collection: dependency: transitive description: @@ -109,18 +109,18 @@ packages: dependency: "direct main" description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.0" collection: dependency: "direct main" description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" convert: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: "direct dev" description: name: dart_style - sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352" + sha256: "25b4624c231844a7a70a3817a729a6190a751ef1c07ded256e126a3b72261444" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.5" file: dependency: transitive description: @@ -180,10 +180,9 @@ packages: floor_annotation: dependency: "direct main" description: - name: floor_annotation - sha256: fa3fa4f198cdd1d922a69ceb06e54663fe59256bf1cb3c036eff206b445a6960 - url: "https://pub.dev" - source: hosted + path: "../floor_annotation" + relative: true + source: path version: "1.4.2" frontend_server_client: dependency: transitive @@ -277,18 +276,18 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16+1" meta: dependency: "direct main" description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.12.0" mime: dependency: transitive description: @@ -301,10 +300,10 @@ packages: dependency: "direct dev" description: name: mockito - sha256: dd61809f04da1838a680926de50a9e87385c1de91c6579629c3d1723946e8059 + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.4.4" node_preamble: dependency: transitive description: @@ -325,10 +324,10 @@ packages: dependency: "direct dev" description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" pool: dependency: transitive description: @@ -341,10 +340,10 @@ packages: dependency: "direct dev" description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: @@ -389,10 +388,10 @@ packages: dependency: "direct main" description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.5.0" source_map_stack_trace: dependency: transitive description: @@ -453,10 +452,10 @@ packages: dependency: "direct main" description: name: strings - sha256: "5af86299505c299640f5564e187c1a2ee9d6308c540e8d65f6385f5c67019122" + sha256: b33f40c4dd3e597bf6d9e7f4f4dc282dad0f19b07d9f320cb5c2183859cbccf5 url: "https://pub.dev" source: hosted - version: "0.2.2" + version: "3.1.1" term_glyph: dependency: transitive description: @@ -469,26 +468,26 @@ packages: dependency: "direct dev" description: name: test - sha256: "4f92f103ef63b1bbac6f4bd1930624fca81b2574464482512c4f0896319be575" + sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" url: "https://pub.dev" source: hosted - version: "1.24.2" + version: "1.25.2" test_api: dependency: transitive description: name: test_api - sha256: daadc9baabec998b062c9091525aa95786508b1c48e9c30f1f891b8bf6ff2e64 + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.5.2" + version: "0.7.0" test_core: dependency: transitive description: name: test_core - sha256: "3642b184882f79e76ca57a9230fb971e494c3c1fd09c21ae3083ce891bcc0aa1" + sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" url: "https://pub.dev" source: hosted - version: "0.5.2" + version: "0.6.0" test_cov: dependency: "direct dev" description: @@ -526,10 +525,10 @@ packages: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" web_socket_channel: dependency: transitive description: @@ -555,4 +554,4 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <=3.3.8" + dart: ">=3.2.6 <=3.3.8" diff --git a/floor_generator/pubspec.yaml b/floor_generator/pubspec.yaml index e7e95a70..ba572593 100644 --- a/floor_generator/pubspec.yaml +++ b/floor_generator/pubspec.yaml @@ -9,27 +9,27 @@ issue_tracker: https://github.com/pinchbv/floor/issues publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=3.2.6 <4.0.0' dependencies: - analyzer: ^5.0.0 - build: ^2.3.0 - build_config: ^1.0.0 - code_builder: ^4.1.0 - collection: ^1.15.0 + analyzer: ^6.4.1 + build: ^2.4.1 + build_config: ^1.1.1 + code_builder: ^4.10.0 + collection: ^1.18.0 floor_annotation: path: ../floor_annotation - meta: ^1.7.0 - source_gen: ^1.2.2 - strings: ^0.2.1 + meta: + source_gen: ^1.5.0 + strings: ^3.1.1 dev_dependencies: - build_test: ^2.1.5 - dart_style: ^2.2.3 - mockito: ^5.2.0 - path: ^1.8.0 - pub_semver: ^2.1.3 - test: ^1.21.1 + build_test: ^2.2.2 + dart_style: ^2.3.4 + mockito: ^5.4.4 + path: ^1.9.0 + pub_semver: ^2.1.4 + test: ^1.25.2 test_cov: git: url: https://github.com/dkaera/test_cov diff --git a/floor_generator/test/fakes.dart b/floor_generator/test/fakes.dart index 441430d0..8ecd1881 100644 --- a/floor_generator/test/fakes.dart +++ b/floor_generator/test/fakes.dart @@ -258,9 +258,6 @@ class FakeClassElement implements ClassElement { @override Source get source => throw UnimplementedError(); - @override - List get superclassConstraints => throw UnimplementedError(); - @override InterfaceType? get supertype => throw UnimplementedError(); @@ -298,28 +295,14 @@ class FakeClassElement implements ClassElement { @override bool get isDartCoreEnum => throw UnimplementedError(); - @override - // TODO: implement augmentation - ClassAugmentationElement? get augmentation => throw UnimplementedError(); - @override // TODO: implement augmented AugmentedClassElement get augmented => throw UnimplementedError(); - @override - // TODO: implement enclosingElement3 - CompilationUnitElement get enclosingElement3 => throw UnimplementedError(); - @override // TODO: implement hasMustBeOverridden bool get hasMustBeOverridden => throw UnimplementedError(); - @override - bool isAccessibleIn2(LibraryElement library) { - // TODO: implement isAccessibleIn2 - throw UnimplementedError(); - } - @override // TODO: implement children List get children => throw UnimplementedError(); @@ -377,6 +360,34 @@ class FakeClassElement implements ClassElement { @override // TODO: implement sinceSdkVersion Version? get sinceSdkVersion => throw UnimplementedError(); + + @override + // TODO: implement augmentationTarget + ClassElement? get augmentationTarget => throw UnimplementedError(); + + @override + // TODO: implement hasImmutable + bool get hasImmutable => throw UnimplementedError(); + + @override + // TODO: implement hasRedeclare + bool get hasRedeclare => throw UnimplementedError(); + + @override + // TODO: implement hasVisibleOutsideTemplate + bool get hasVisibleOutsideTemplate => throw UnimplementedError(); + + @override + // TODO: implement isAugmentation + bool get isAugmentation => throw UnimplementedError(); + + @override + // TODO: implement isInline + bool get isInline => throw UnimplementedError(); + + @override + // TODO: implement augmentation + ClassElement? get augmentation => throw UnimplementedError(); } class FakeFieldElement implements FieldElement { @@ -581,24 +592,10 @@ class FakeFieldElement implements FieldElement { @override Element get nonSynthetic => throw UnimplementedError(); - @override - // TODO: implement augmentation - FieldAugmentationElement? get augmentation => throw UnimplementedError(); - - @override - // TODO: implement enclosingElement3 - Element get enclosingElement3 => throw UnimplementedError(); - @override // TODO: implement hasMustBeOverridden bool get hasMustBeOverridden => throw UnimplementedError(); - @override - bool isAccessibleIn2(LibraryElement library) { - // TODO: implement isAccessibleIn2 - throw UnimplementedError(); - } - @override // TODO: implement children List get children => throw UnimplementedError(); @@ -614,6 +611,30 @@ class FakeFieldElement implements FieldElement { @override // TODO: implement sinceSdkVersion Version? get sinceSdkVersion => throw UnimplementedError(); + + @override + // TODO: implement augmentationTarget + FieldElement? get augmentationTarget => throw UnimplementedError(); + + @override + // TODO: implement hasImmutable + bool get hasImmutable => throw UnimplementedError(); + + @override + // TODO: implement hasRedeclare + bool get hasRedeclare => throw UnimplementedError(); + + @override + // TODO: implement hasVisibleOutsideTemplate + bool get hasVisibleOutsideTemplate => throw UnimplementedError(); + + @override + // TODO: implement isAugmentation + bool get isAugmentation => throw UnimplementedError(); + + @override + // TODO: implement augmentation + FieldElement? get augmentation => throw UnimplementedError(); } class FakeDartObject implements DartObject { diff --git a/floor_generator/test/misc/extension/type_converter_element_extension_test.dart b/floor_generator/test/misc/extension/type_converter_element_extension_test.dart index 98d0de85..b21a3b31 100644 --- a/floor_generator/test/misc/extension/type_converter_element_extension_test.dart +++ b/floor_generator/test/misc/extension/type_converter_element_extension_test.dart @@ -47,7 +47,7 @@ void main() { final actual = () => element.getTypeConverters(typeConverterScope); - expect(actual, throwsProcessorError()); + expect(actual, throwsUnresolvedAnnotationException()); }); test('throws error when empty list in annotation', () async { diff --git a/floor_generator/test/processor/entity_processor_test.dart b/floor_generator/test/processor/entity_processor_test.dart index 166955a6..02332bbb 100644 --- a/floor_generator/test/processor/entity_processor_test.dart +++ b/floor_generator/test/processor/entity_processor_test.dart @@ -1,7 +1,6 @@ import 'package:analyzer/dart/element/element.dart'; import 'package:build_test/build_test.dart'; import 'package:floor_annotation/floor_annotation.dart' as annotations; -import 'package:floor_generator/misc/constants.dart'; import 'package:floor_generator/processor/entity_processor.dart'; import 'package:floor_generator/processor/error/entity_processor_error.dart'; import 'package:floor_generator/processor/error/queryable_processor_error.dart'; @@ -14,7 +13,6 @@ import 'package:floor_generator/value_object/primary_key.dart'; import 'package:source_gen/source_gen.dart'; import 'package:test/test.dart'; -import '../fakes.dart'; import '../test_utils.dart'; void main() { @@ -68,7 +66,7 @@ void main() { primaryKeys:null, withoutRowid:null, ) - @Fts3(tokenizerArgs:null) + @Fts3() class Person { @primaryKey final int id; @@ -279,50 +277,6 @@ void main() { ); expect(actual, equals(expected)); }); - - test('error with wrong onUpdate Annotation', () async { - final classElements = await _createClassElements(''' - @entity - class Person { - @primaryKey - final int id; - - final String name; - - Person(this.id, this.name); - } - - @Entity( - foreignKeys: [ - ForeignKey( - childColumns: ['owner_id'], - parentColumns: ['id'], - entity: Person, - onUpdate: null - onDelete: ForeignKeyAction.setNull, - ) - ], - ) - class Dog { - @primaryKey - final int id; - - final String name; - - @ColumnInfo(name: 'owner_id') - final int ownerId; - - Dog(this.id, this.name, this.ownerId); - } - '''); - - final processor = EntityProcessor(classElements[1], {}); - expect( - processor.process, - throwsInvalidGenerationSourceError( - EntityProcessorError(classElements[1]).wrongForeignKeyAction( - FakeDartObject(), ForeignKeyField.onUpdate))); - }); }); group('fts keys', () { @@ -566,7 +520,6 @@ void main() { childColumns: ['owner_id'], parentColumns: [], entity: Person, - onUpdate: null onDelete: ForeignKeyAction.setNull, ) ], @@ -608,7 +561,6 @@ void main() { childColumns: [], parentColumns: ['id'], entity: Person, - onUpdate: null onDelete: ForeignKeyAction.setNull, ) ], @@ -675,7 +627,6 @@ void main() { childColumns: ['owner_id'], parentColumns: ['id'], entity: Person, - onUpdate: null onDelete: ForeignKeyAction.setNull, ) ], diff --git a/floor_generator/test/test_utils.dart b/floor_generator/test/test_utils.dart index 5858f00d..0a5960ae 100644 --- a/floor_generator/test/test_utils.dart +++ b/floor_generator/test/test_utils.dart @@ -157,6 +157,10 @@ Matcher throwsProcessorError([ } } +Matcher throwsUnresolvedAnnotationException() { + return throwsA(isA()); +} + Future createDao(final String methodSignature) async { final library = await resolveSource(''' library test;