From 2521611d6a1e728a5ecfe6a210665f59f84aef39 Mon Sep 17 00:00:00 2001 From: "Nathan.fooo" <86001920+appflowy@users.noreply.github.com> Date: Sun, 31 Dec 2023 10:23:43 +0800 Subject: [PATCH] chore: bump sqlite system deps (#4262) * chore: bump sqlite system deps * chore: bump open ssl * chore: fix clippy * chore: remove unused deps * chore: fix test --- frontend/appflowy_tauri/src-tauri/Cargo.lock | 338 ++---------------- frontend/appflowy_tauri/src-tauri/Cargo.toml | 16 +- frontend/rust-lib/Cargo.lock | 146 ++------ frontend/rust-lib/Cargo.toml | 16 +- frontend/rust-lib/collab-integrate/Cargo.toml | 4 - frontend/rust-lib/flowy-ai/Cargo.toml | 4 +- frontend/rust-lib/flowy-core/Cargo.toml | 1 - .../rust-lib/flowy-database-deps/Cargo.toml | 1 - .../rust-lib/flowy-folder-deps/Cargo.toml | 1 - frontend/rust-lib/flowy-server/Cargo.toml | 2 - frontend/rust-lib/flowy-sqlite/Cargo.toml | 11 +- .../flowy-sqlite/src/sqlite_impl/errors.rs | 32 +- .../flowy-sqlite/src/sqlite_impl/pragma.rs | 7 +- frontend/rust-lib/flowy-user-deps/Cargo.toml | 3 +- frontend/rust-lib/lib-infra/Cargo.toml | 1 - 15 files changed, 99 insertions(+), 484 deletions(-) diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index 041490f41a..f34b32d81f 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -168,50 +168,12 @@ dependencies = [ "uuid", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" -[[package]] -name = "async-convert" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d416feee97712e43152cd42874de162b8f9b77295b1c85e5d92725cc8310bae" -dependencies = [ - "async-trait", -] - -[[package]] -name = "async-openai" -version = "0.14.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7150fb5d9cc4eb0184af43ce75a89620dc3747d3c816e8b0ba200682d0155c05" -dependencies = [ - "async-convert", - "backoff", - "base64 0.21.5", - "derive_builder", - "futures", - "rand 0.8.5", - "reqwest", - "reqwest-eventsource", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -330,20 +292,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "backoff" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" -dependencies = [ - "futures-core", - "getrandom 0.2.10", - "instant", - "pin-project-lite", - "rand 0.8.5", - "tokio", -] - [[package]] name = "backtrace" version = "0.3.67" @@ -664,7 +612,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -883,7 +831,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", @@ -902,14 +850,13 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", "base64 0.21.5", "chrono", "collab", - "collab-derive", "collab-entity", "collab-persistence", "collab-plugins", @@ -929,26 +876,13 @@ dependencies = [ "uuid", ] -[[package]] -name = "collab-derive" -version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" -dependencies = [ - "proc-macro2", - "quote", - "serde_json", - "syn 1.0.109", - "yrs", -] - [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "collab", - "collab-derive", "collab-persistence", "nanoid", "parking_lot", @@ -963,7 +897,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "bytes", @@ -977,12 +911,11 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "chrono", "collab", - "collab-derive", "collab-persistence", "parking_lot", "serde", @@ -1001,13 +934,9 @@ dependencies = [ "anyhow", "async-trait", "collab", - "collab-database", - "collab-document", "collab-entity", - "collab-folder", "collab-persistence", "collab-plugins", - "futures", "lib-infra", "parking_lot", "serde", @@ -1019,7 +948,7 @@ dependencies = [ [[package]] name = "collab-persistence" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", @@ -1040,7 +969,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", @@ -1066,7 +995,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "collab", @@ -1095,18 +1024,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "config" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" -dependencies = [ - "lazy_static", - "nom 5.1.3", - "serde", - "yaml-rust", -] - [[package]] name = "console" version = "0.14.1" @@ -1325,7 +1242,7 @@ dependencies = [ "cssparser-macros", "dtoa-short", "itoa 1.0.6", - "phf 0.8.0", + "phf 0.11.2", "smallvec", ] @@ -1379,38 +1296,14 @@ dependencies = [ "cipher", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - [[package]] name = "darling" version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ - "darling_core 0.20.1", - "darling_macro 0.20.1", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", + "darling_core", + "darling_macro", ] [[package]] @@ -1427,24 +1320,13 @@ dependencies = [ "syn 2.0.32", ] -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - [[package]] name = "darling_macro" version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ - "darling_core 0.20.1", + "darling_core", "quote", "syn 2.0.32", ] @@ -1508,37 +1390,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_builder" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" -dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - [[package]] name = "derive_more" version = "0.99.17" @@ -1667,12 +1518,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" -[[package]] -name = "dotenv" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" - [[package]] name = "dotenvy" version = "0.15.7" @@ -1782,32 +1627,12 @@ dependencies = [ "libc", ] -[[package]] -name = "error-chain" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" -dependencies = [ - "backtrace", -] - [[package]] name = "event-listener" version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "eventsource-stream" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fef4569247a5f429d9156b9d0a2599914385dd189c539334c625d8099d90ab" -dependencies = [ - "futures-core", - "nom 7.1.3", - "pin-project-lite", -] - [[package]] name = "faccess" version = "0.2.4" @@ -1898,20 +1723,6 @@ dependencies = [ "miniz_oxide 0.7.1", ] -[[package]] -name = "flowy-ai" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-openai", - "dotenv", - "lib-infra", - "reqwest", - "serde", - "serde_json", - "tokio", -] - [[package]] name = "flowy-ast" version = "0.1.0" @@ -1972,7 +1783,6 @@ dependencies = [ "collab-integrate", "collab-plugins", "diesel", - "flowy-ai", "flowy-config", "flowy-database-deps", "flowy-database2", @@ -2012,7 +1822,6 @@ dependencies = [ "anyhow", "collab", "collab-entity", - "flowy-error", "lib-infra", ] @@ -2219,7 +2028,6 @@ dependencies = [ "collab", "collab-entity", "collab-folder", - "flowy-error", "lib-infra", "uuid", ] @@ -2250,7 +2058,6 @@ dependencies = [ "collab-document", "collab-entity", "collab-plugins", - "config", "flowy-database-deps", "flowy-document-deps", "flowy-encrypt", @@ -2271,7 +2078,6 @@ dependencies = [ "postgrest", "reqwest", "serde", - "serde-aux", "serde_json", "thiserror", "tokio", @@ -2301,14 +2107,13 @@ dependencies = [ "diesel", "diesel_derives", "diesel_migrations", - "error-chain", - "lazy_static", "libsqlite3-sys", "parking_lot", "r2d2", "scheduled-thread-pool", "serde", "serde_json", + "thiserror", "tracing", ] @@ -2393,7 +2198,6 @@ dependencies = [ "collab", "collab-entity", "flowy-error", - "flowy-folder-deps", "lib-infra", "serde", "serde_json", @@ -2531,12 +2335,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" -[[package]] -name = "futures-timer" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" - [[package]] name = "futures-util" version = "0.3.29" @@ -3475,19 +3273,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec 0.5.2", - "bitflags 1.3.2", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "lib-dispatch" version = "0.1.0" @@ -3524,7 +3309,6 @@ dependencies = [ "futures-core", "md5", "pin-project", - "rand 0.8.5", "tempfile", "tokio", "validator", @@ -3586,9 +3370,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.22.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", @@ -3615,12 +3399,6 @@ dependencies = [ "safemem", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.11" @@ -3921,17 +3699,6 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" -[[package]] -name = "nom" -version = "5.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" -dependencies = [ - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.3" @@ -4388,6 +4155,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ + "phf_macros 0.11.2", "phf_shared 0.11.2", ] @@ -4479,6 +4247,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "phf_macros" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +dependencies = [ + "phf_generator 0.11.2", + "phf_shared 0.11.2", + "proc-macro2", + "quote", + "syn 2.0.32", +] + [[package]] name = "phf_shared" version = "0.8.0" @@ -4720,7 +4501,7 @@ checksum = "8bdf592881d821b83d471f8af290226c8d51402259e9bb5be7f9f8bdebbb11ac" dependencies = [ "bytes", "heck 0.4.1", - "itertools 0.10.5", + "itertools 0.11.0", "log", "multimap", "once_cell", @@ -4741,7 +4522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.32", @@ -5182,7 +4963,6 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls", - "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", @@ -5201,22 +4981,6 @@ dependencies = [ "winreg 0.50.0", ] -[[package]] -name = "reqwest-eventsource" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f03f570355882dd8d15acc3a313841e6e90eddbc76a93c748fd82cc13ba9f51" -dependencies = [ - "eventsource-stream", - "futures-core", - "futures-timer", - "mime", - "nom 7.1.3", - "pin-project-lite", - "reqwest", - "thiserror", -] - [[package]] name = "ring" version = "0.16.20" @@ -5319,7 +5083,7 @@ version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0446843641c69436765a35a5a77088e28c2e6a12da93e84aa3ab1cd4aa5a042" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "borsh", "bytecheck", "byteorder", @@ -5387,18 +5151,6 @@ dependencies = [ "sct", ] -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", -] - [[package]] name = "rustls-pemfile" version = "1.0.2" @@ -5631,17 +5383,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-aux" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3dfe1b7eb6f9dcf011bd6fad169cdeaae75eda0d61b1a99a3f015b41b0cae39" -dependencies = [ - "chrono", - "serde", - "serde_json", -] - [[package]] name = "serde_derive" version = "1.0.188" @@ -5718,7 +5459,7 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" dependencies = [ - "darling 0.20.1", + "darling", "proc-macro2", "quote", "syn 2.0.32", @@ -5986,7 +5727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ "itertools 0.11.0", - "nom 7.1.3", + "nom", "unicode_categories", ] @@ -7789,15 +7530,6 @@ dependencies = [ "libc", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yrs" version = "0.17.1" diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 0923fee625..57a639cd41 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -67,14 +67,14 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "a45 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index f2d3ec4086..80a4b13d2b 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -137,12 +137,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -606,7 +600,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -742,7 +736,7 @@ dependencies = [ [[package]] name = "collab" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", @@ -761,14 +755,13 @@ dependencies = [ [[package]] name = "collab-database" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", "base64 0.21.5", "chrono", "collab", - "collab-derive", "collab-entity", "collab-persistence", "collab-plugins", @@ -788,26 +781,13 @@ dependencies = [ "uuid", ] -[[package]] -name = "collab-derive" -version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" -dependencies = [ - "proc-macro2", - "quote", - "serde_json", - "syn 1.0.109", - "yrs", -] - [[package]] name = "collab-document" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "collab", - "collab-derive", "collab-persistence", "nanoid", "parking_lot", @@ -822,7 +802,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "bytes", @@ -836,12 +816,11 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "chrono", "collab", - "collab-derive", "collab-persistence", "parking_lot", "serde", @@ -860,13 +839,9 @@ dependencies = [ "anyhow", "async-trait", "collab", - "collab-database", - "collab-document", "collab-entity", - "collab-folder", "collab-persistence", "collab-plugins", - "futures", "lib-infra", "parking_lot", "serde", @@ -878,7 +853,7 @@ dependencies = [ [[package]] name = "collab-persistence" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", @@ -899,7 +874,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "async-trait", @@ -925,7 +900,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f#cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=7d7f53250f7a8297c69e2cdc72e441f5469eaf11#7d7f53250f7a8297c69e2cdc72e441f5469eaf11" dependencies = [ "anyhow", "collab", @@ -938,18 +913,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "config" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b076e143e1d9538dde65da30f8481c2a6c44040edb8e02b9bf1351edb92ce3" -dependencies = [ - "lazy_static", - "nom 5.1.3", - "serde", - "yaml-rust", -] - [[package]] name = "console" version = "0.14.1" @@ -1562,15 +1525,6 @@ dependencies = [ "libc", ] -[[package]] -name = "error-chain" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02" -dependencies = [ - "backtrace", -] - [[package]] name = "event-integration" version = "0.1.0" @@ -1629,7 +1583,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74fef4569247a5f429d9156b9d0a2599914385dd189c539334c625d8099d90ab" dependencies = [ "futures-core", - "nom 7.1.3", + "nom", "pin-project-lite", ] @@ -1783,7 +1737,6 @@ dependencies = [ "collab-plugins", "console-subscriber", "diesel", - "flowy-ai", "flowy-config", "flowy-database-deps", "flowy-database2", @@ -1823,7 +1776,6 @@ dependencies = [ "anyhow", "collab", "collab-entity", - "flowy-error", "lib-infra", ] @@ -2035,7 +1987,6 @@ dependencies = [ "collab", "collab-entity", "collab-folder", - "flowy-error", "lib-infra", "tokio", "uuid", @@ -2068,7 +2019,6 @@ dependencies = [ "collab-document", "collab-entity", "collab-plugins", - "config", "dotenv", "flowy-database-deps", "flowy-document-deps", @@ -2090,7 +2040,6 @@ dependencies = [ "postgrest", "reqwest", "serde", - "serde-aux", "serde_json", "thiserror", "tokio", @@ -2121,8 +2070,6 @@ dependencies = [ "diesel", "diesel_derives", "diesel_migrations", - "error-chain", - "lazy_static", "libsqlite3-sys", "openssl", "openssl-sys", @@ -2132,6 +2079,7 @@ dependencies = [ "serde", "serde_json", "tempfile", + "thiserror", "tracing", ] @@ -2224,7 +2172,6 @@ dependencies = [ "collab", "collab-entity", "flowy-error", - "flowy-folder-deps", "lib-infra", "serde", "serde_json", @@ -2595,7 +2542,7 @@ dependencies = [ "base64 0.13.1", "byteorder", "flate2", - "nom 7.1.3", + "nom", "num-traits", ] @@ -2980,19 +2927,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec 0.5.2", - "bitflags 1.3.2", - "cfg-if", - "ryu", - "static_assertions", -] - [[package]] name = "lib-dispatch" version = "0.1.0" @@ -3029,7 +2963,6 @@ dependencies = [ "futures-core", "md5", "pin-project", - "rand 0.8.5", "tempfile", "tokio", "validator", @@ -3091,9 +3024,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.22.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" dependencies = [ "cc", "pkg-config", @@ -3111,12 +3044,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.11" @@ -3341,17 +3268,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" -[[package]] -name = "nom" -version = "5.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" -dependencies = [ - "lexical-core", - "memchr", - "version_check", -] - [[package]] name = "nom" version = "7.1.3" @@ -3455,9 +3371,9 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.57" +version = "0.10.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" +checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" dependencies = [ "bitflags 2.4.0", "cfg-if", @@ -3496,9 +3412,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.93" +version = "0.9.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" +checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" dependencies = [ "cc", "libc", @@ -4546,7 +4462,7 @@ dependencies = [ "futures-core", "futures-timer", "mime", - "nom 7.1.3", + "nom", "pin-project-lite", "reqwest", "thiserror", @@ -4654,7 +4570,7 @@ version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "borsh", "bytes", "num-traits", @@ -4914,17 +4830,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-aux" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3dfe1b7eb6f9dcf011bd6fad169cdeaae75eda0d61b1a99a3f015b41b0cae39" -dependencies = [ - "chrono", - "serde", - "serde_json", -] - [[package]] name = "serde_derive" version = "1.0.193" @@ -5188,7 +5093,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ "itertools 0.11.0", - "nom 7.1.3", + "nom", "unicode_categories", ] @@ -6472,15 +6377,6 @@ dependencies = [ "tap", ] -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] - [[package]] name = "yrs" version = "0.17.1" diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index 6d6b5fa149..977918c8c7 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -117,11 +117,11 @@ client-api = { git = "https://github.com/AppFlowy-IO/AppFlowy-Cloud", rev = "a45 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } -collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf6aae1fbeb97d7b2f475fcdfc73217942ed8c8f" } +collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-plugins = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } +collab-persistence = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "7d7f53250f7a8297c69e2cdc72e441f5469eaf11" } diff --git a/frontend/rust-lib/collab-integrate/Cargo.toml b/frontend/rust-lib/collab-integrate/Cargo.toml index 716beacf2b..ebcc90701b 100644 --- a/frontend/rust-lib/collab-integrate/Cargo.toml +++ b/frontend/rust-lib/collab-integrate/Cargo.toml @@ -8,17 +8,13 @@ edition = "2021" [dependencies] collab = { version = "0.1.0" } collab-persistence = { version = "0.1.0", features = ["rocksdb_persistence"] } -collab-folder = { version = "0.1.0" } -collab-database = { version = "0.1.0" } collab-plugins = { version = "0.1.0" } -collab-document = { version = "0.1.0" } collab-entity = { version = "0.1.0" } serde.workspace = true serde_json.workspace = true anyhow.workspace = true tracing.workspace = true parking_lot.workspace = true -futures.workspace = true async-trait.workspace = true tokio = { workspace = true, features = ["sync"]} lib-infra = { workspace = true } diff --git a/frontend/rust-lib/flowy-ai/Cargo.toml b/frontend/rust-lib/flowy-ai/Cargo.toml index 6a1f056c0c..67ab23cac1 100644 --- a/frontend/rust-lib/flowy-ai/Cargo.toml +++ b/frontend/rust-lib/flowy-ai/Cargo.toml @@ -13,4 +13,6 @@ anyhow.workspace = true lib-infra = { workspace = true } async-openai = "0.14.2" tokio = { workspace = true, features = ["rt", "sync"] } -dotenv = "0.15.0" \ No newline at end of file + +[dev-dependencies] +dotenv = "0.15.0" diff --git a/frontend/rust-lib/flowy-core/Cargo.toml b/frontend/rust-lib/flowy-core/Cargo.toml index b8fa9719a7..c9000d222b 100644 --- a/frontend/rust-lib/flowy-core/Cargo.toml +++ b/frontend/rust-lib/flowy-core/Cargo.toml @@ -24,7 +24,6 @@ flowy-server-config = { workspace = true } flowy-config = { workspace = true } flowy-date = { workspace = true } collab-integrate = { workspace = true, features = ["supabase_integrate", "appflowy_cloud_integrate", "snapshot_plugin"] } -flowy-ai = { workspace = true } collab-entity = { version = "0.1.0" } collab-plugins = { version = "0.1.0" } collab = { version = "0.1.0" } diff --git a/frontend/rust-lib/flowy-database-deps/Cargo.toml b/frontend/rust-lib/flowy-database-deps/Cargo.toml index c9ed817703..3c8e2d3f0c 100644 --- a/frontend/rust-lib/flowy-database-deps/Cargo.toml +++ b/frontend/rust-lib/flowy-database-deps/Cargo.toml @@ -7,7 +7,6 @@ edition = "2021" [dependencies] lib-infra = { workspace = true } -flowy-error = { workspace = true } collab-entity = { version = "0.1.0" } collab = { version = "0.1.0" } anyhow.workspace = true \ No newline at end of file diff --git a/frontend/rust-lib/flowy-folder-deps/Cargo.toml b/frontend/rust-lib/flowy-folder-deps/Cargo.toml index 6513226950..ba9d660d67 100644 --- a/frontend/rust-lib/flowy-folder-deps/Cargo.toml +++ b/frontend/rust-lib/flowy-folder-deps/Cargo.toml @@ -7,7 +7,6 @@ edition = "2021" [dependencies] lib-infra = { workspace = true } -flowy-error = { workspace = true } collab-folder = { version = "0.1.0" } collab = { version = "0.1.0" } collab-entity = { version = "0.1.0" } diff --git a/frontend/rust-lib/flowy-server/Cargo.toml b/frontend/rust-lib/flowy-server/Cargo.toml index 24322f300e..2eb81d8d59 100644 --- a/frontend/rust-lib/flowy-server/Cargo.toml +++ b/frontend/rust-lib/flowy-server/Cargo.toml @@ -11,10 +11,8 @@ futures.workspace = true futures-util = "0.3.26" reqwest = { version = "0.11.20", features = ["native-tls-vendored", "multipart", "blocking"] } hyper = "0.14" -config = { version = "0.10.1", default-features = false, features = ["yaml"] } serde.workspace = true serde_json.workspace = true -serde-aux = "4.2.0" thiserror = "1.0" tokio = { workspace = true, features = ["sync"]} parking_lot.workspace = true diff --git a/frontend/rust-lib/flowy-sqlite/Cargo.toml b/frontend/rust-lib/flowy-sqlite/Cargo.toml index da45d11167..e49452df75 100644 --- a/frontend/rust-lib/flowy-sqlite/Cargo.toml +++ b/frontend/rust-lib/flowy-sqlite/Cargo.toml @@ -10,18 +10,17 @@ diesel.workspace = true diesel_derives = { version = "2.1.0", features = ["sqlite", "r2d2"] } diesel_migrations = { version = "2.1.0", features = ["sqlite"] } tracing.workspace = true -lazy_static = "1.4.0" serde.workspace = true serde_json.workspace = true anyhow.workspace = true parking_lot.workspace = true -r2d2 = ">= 0.8.2, < 0.9.0" -libsqlite3-sys = { version = ">=0.17.2, <0.28.0", features = ["bundled"] } +r2d2 = "0.8.10" +libsqlite3-sys = { version = "0.27.0", features = ["bundled"] } scheduled-thread-pool = "0.2.6" -error-chain = "=0.12.0" -openssl = { version = "0.10.45", optional = true, features = ["vendored"] } -openssl-sys = { version = "0.9.80", optional = true, features = ["vendored"] } +openssl = { version = "0.10.62", optional = true, features = ["vendored"] } +openssl-sys = { version = "0.9.98", optional = true, features = ["vendored"] } +thiserror = "1.0" [dev-dependencies] tempfile = "3.5.0" diff --git a/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/errors.rs b/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/errors.rs index 984f6feccc..79aa8896ce 100644 --- a/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/errors.rs +++ b/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/errors.rs @@ -1,19 +1,15 @@ -use error_chain::{ - error_chain, error_chain_processing, impl_error_chain_kind, impl_error_chain_processed, - impl_extract_backtrace, -}; - -error_chain! { - errors { - UnknownMigrationExists(v: String) { - display("unknown migration version: '{}'", v), - } - } - foreign_links { - R2D2(::r2d2::Error); - Migrations(::diesel_migrations::MigrationError); - Diesel(::diesel::result::Error); - Connection(::diesel::ConnectionError); - Io(::std::io::Error); - } +#[derive(Debug, thiserror::Error)] +pub enum Error { + #[error("Migration error: {0}")] + Migration(#[from] diesel_migrations::MigrationError), + #[error("r2d2 error: {0}")] + R2D2(#[from] r2d2::Error), + #[error("diesel error: {0}")] + Diesel(#[from] diesel::result::Error), + #[error("diesel connect error: {0}")] + Connect(#[from] diesel::ConnectionError), + #[error("internal error: {0}")] + Internal(#[from] anyhow::Error), } + +pub type Result = std::result::Result; diff --git a/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/pragma.rs b/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/pragma.rs index 636c5cd09d..05054a6406 100644 --- a/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/pragma.rs +++ b/frontend/rust-lib/flowy-sqlite/src/sqlite_impl/pragma.rs @@ -1,5 +1,6 @@ #![allow(clippy::upper_case_acronyms)] +use anyhow::anyhow; use std::{ convert::{TryFrom, TryInto}, fmt, @@ -139,7 +140,7 @@ impl FromStr for SQLiteJournalMode { "MEMORY" => Ok(Self::MEMORY), "WAL" => Ok(Self::WAL), "OFF" => Ok(Self::OFF), - _ => Err(format!("Unknown value {} for JournalMode", s).into()), + _ => Err(anyhow!("Unknown value {} for JournalMode", s).into()), } } } @@ -176,7 +177,7 @@ impl TryFrom for SQLiteSynchronous { 1 => Ok(Self::NORMAL), 2 => Ok(Self::FULL), 3 => Ok(Self::EXTRA), - _ => Err(format!("Unknown value {} for Synchronous", v).into()), + _ => Err(anyhow!("Unknown value {} for Synchronous", v).into()), } } } @@ -190,7 +191,7 @@ impl FromStr for SQLiteSynchronous { "1" | "NORMAL" => Ok(Self::NORMAL), "2" | "FULL" => Ok(Self::FULL), "3" | "EXTRA" => Ok(Self::EXTRA), - _ => Err(format!("Unknown value {} for Synchronous", s).into()), + _ => Err(anyhow!("Unknown value {} for Synchronous", s).into()), } } } diff --git a/frontend/rust-lib/flowy-user-deps/Cargo.toml b/frontend/rust-lib/flowy-user-deps/Cargo.toml index efa53d2960..cefb351713 100644 --- a/frontend/rust-lib/flowy-user-deps/Cargo.toml +++ b/frontend/rust-lib/flowy-user-deps/Cargo.toml @@ -17,5 +17,4 @@ serde_repr.workspace = true chrono = { workspace = true, default-features = false, features = ["clock", "serde"] } anyhow.workspace = true tokio = { workspace = true, features = ["sync"] } -tokio-stream = "0.1.14" -flowy-folder-deps.workspace = true \ No newline at end of file +tokio-stream = "0.1.14" \ No newline at end of file diff --git a/frontend/rust-lib/lib-infra/Cargo.toml b/frontend/rust-lib/lib-infra/Cargo.toml index 9c7ec3ed41..714858968a 100644 --- a/frontend/rust-lib/lib-infra/Cargo.toml +++ b/frontend/rust-lib/lib-infra/Cargo.toml @@ -11,7 +11,6 @@ bytes = { version = "1.5" } pin-project = "1.1.3" futures-core = { version = "0.3" } tokio = { workspace = true, features = ["time", "rt"] } -rand = "0.8.5" async-trait.workspace = true md5 = "0.7.0" anyhow.workspace = true