Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: update build.rs with cfg flag control (#1627)

Nathan.fooo436291c01abb
diff --git a/frontend/rust-lib/dart-ffi/Cargo.toml b/frontend/rust-lib/dart-ffi/Cargo.toml
index 248ea3a36a..a8b3892ac2 100644
--- a/frontend/rust-lib/dart-ffi/Cargo.toml
+++ b/frontend/rust-lib/dart-ffi/Cargo.toml
@@ -31,7 +31,7 @@ dart-notify = { path = "../dart-notify" }
flowy-derive = { path = "../flowy-derive" }
[features]
-default = ["flowy-sdk/dart", "dart-notify/dart", "flutter"]
+default = ["flowy-sdk/dart", "flutter"]
flutter = []
http_sync = ["flowy-sdk/http_sync", "flowy-sdk/use_bunyan"]
openssl_vendored = ["flowy-sdk/openssl_vendored"]
diff --git a/frontend/rust-lib/dart-notify/Cargo.toml b/frontend/rust-lib/dart-notify/Cargo.toml
index 88808d2f73..57a7663043 100644
--- a/frontend/rust-lib/dart-notify/Cargo.toml
+++ b/frontend/rust-lib/dart-notify/Cargo.toml
@@ -15,8 +15,5 @@ bytes = { version = "1.0" }
flowy-derive = {path = "../flowy-derive" }
lib-dispatch = {path = "../lib-dispatch" }
-[features]
-dart = ["flowy-codegen/dart"]
-
[build-dependencies]
-flowy-codegen = { path = "../flowy-codegen"}
+flowy-codegen = { path = "../flowy-codegen", features = ["dart"]}
diff --git a/frontend/rust-lib/flowy-error/Cargo.toml b/frontend/rust-lib/flowy-error/Cargo.toml
index 316e7c5b3b..bf6bfbd25b 100644
--- a/frontend/rust-lib/flowy-error/Cargo.toml
+++ b/frontend/rust-lib/flowy-error/Cargo.toml
@@ -31,4 +31,4 @@ db = ["flowy-database", "lib-sqlite", "r2d2"]
dart = ["flowy-codegen/dart"]
[build-dependencies]
-flowy-codegen = { path = "../flowy-codegen"}
+flowy-codegen = { path = "../flowy-codegen", features = ["proto_gen"]}
diff --git a/shared-lib/flowy-http-model/Cargo.toml b/shared-lib/flowy-http-model/Cargo.toml
index 7e63670624..61a7522352 100644
--- a/shared-lib/flowy-http-model/Cargo.toml
+++ b/shared-lib/flowy-http-model/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
bytes = "1.0"
md5 = "0.7.0"
-serde = {versino = "1.0"}
+serde = { version = "1.0" }
serde_json = { version = "1.0" }
serde_repr = "0.1"