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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: cache dart_event.dart file
appflowyafd8335e9573
diff --git a/.run/dart-event.run.xml b/.run/dart-event.run.xmlindex 71ac27e8e7..911316db88 100644--- a/.run/dart-event.run.xml+++ b/.run/dart-event.run.xml@@ -1,6 +1,6 @@<component name="ProjectRunConfigurationManager"><configuration default="false" name="dart-event" type="CargoCommandRunConfiguration" factoryName="Cargo Command">- <option name="command" value="run --manifest-path $PROJECT_DIR$/scripts/flowy-tool/Cargo.toml -- dart-event --rust_source=$PROJECT_DIR$/rust-lib/ --output=$PROJECT_DIR$/app_flowy/packages/flowy_sdk/lib/dispatch/code_gen.dart" />+ <option name="command" value="run --manifest-path $PROJECT_DIR$/scripts/flowy-tool/Cargo.toml -- dart-event --rust_source=$PROJECT_DIR$/rust-lib/ --output=$PROJECT_DIR$/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event.dart" /><option name="workingDirectory" value="file://$PROJECT_DIR$" /><option name="channel" value="DEFAULT" /><option name="allFeatures" value="false" />diff --git a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/code_gen.dart b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event.dartsimilarity index 100%rename from frontend/app_flowy/packages/flowy_sdk/lib/dispatch/code_gen.dartrename to frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dart_event.dartdiff --git a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dartindex e78641d0fb..40c7a06867 100644--- a/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart+++ b/frontend/app_flowy/packages/flowy_sdk/lib/dispatch/dispatch.dart@@ -27,7 +27,7 @@ import 'package:protobuf/protobuf.dart';import 'dart:convert' show utf8;import 'error.dart';-part 'code_gen.dart';+part 'dart_event.dart';enum FFIException {RequestIsEmpty,diff --git a/frontend/rust-lib/dart-ffi/build.rs b/frontend/rust-lib/dart-ffi/build.rsindex 01f337bce8..91c656ce10 100644--- a/frontend/rust-lib/dart-ffi/build.rs+++ b/frontend/rust-lib/dart-ffi/build.rs@@ -11,6 +11,7 @@ fn main() {fn copy_dart_event_files() {let workspace_dir = std::env::var("CARGO_MAKE_WORKING_DIRECTORY").unwrap();let flutter_sdk_path = std::env::var("FLUTTER_FLOWY_SDK_PATH").unwrap();- let output_file = format!("{}/{}/lib/dispatch/code_gen.dart", workspace_dir, flutter_sdk_path);+ let output_file = format!("{}/{}/lib/dispatch/dart_event.dart", workspace_dir, flutter_sdk_path);+ println!("cargo:rerun-if-changed={}", output_file);dart_event::write_dart_event_file(&output_file);}diff --git a/frontend/scripts/makefile/protobuf.toml b/frontend/scripts/makefile/protobuf.tomlindex edfce94e5a..4d594b3532 100644--- a/frontend/scripts/makefile/protobuf.toml+++ b/frontend/scripts/makefile/protobuf.toml@@ -107,7 +107,7 @@ script = [flutter_lib=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packagesrust_source=${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/- output=${flutter_lib}/flowy_sdk/lib/dispatch/code_gen.dart+ output=${flutter_lib}/flowy_sdk/lib/dispatch/dart_event.dartcargo run \--manifest-path ${flowy_tool} dart-event \@@ -124,7 +124,7 @@ script = [flutter_lib=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/app_flowy/packagesrust_source=set ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/rust-lib/- output=set ${flutter_lib}/flowy_sdk/lib/dispatch/code_gen.dart+ output=set ${flutter_lib}/flowy_sdk/lib/dispatch/dart_event.dartexec cmd.exe /c cargo run \--manifest-path ${flowy_tool} dart-event \