diff --git a/frontend/rust-lib/flowy-error/build.rs b/frontend/rust-lib/flowy-error/build.rs index 8dfda671567f2..ad0c74036c62f 100644 --- a/frontend/rust-lib/flowy-error/build.rs +++ b/frontend/rust-lib/flowy-error/build.rs @@ -1,4 +1,14 @@ fn main() { #[cfg(feature = "dart")] flowy_codegen::protobuf_file::dart_gen(env!("CARGO_PKG_NAME")); + #[cfg(feature = "dart")] + { + println!("Generating Dart protobuf code for package: {}", env!("CARGO_PKG_NAME")); + flowy_codegen::protobuf_file::dart_gen(env!("CARGO_PKG_NAME")); + } + + #[cfg(not(feature = "dart"))] + { + println!("Dart feature not enabled; skipping code generation."); +    } }