workaround for code generator bug

This commit is contained in:
John Smith 2022-02-01 20:22:01 -05:00
parent 4bfa72f2db
commit ece93a21e7
9 changed files with 1159 additions and 906 deletions

View file

@ -92,6 +92,33 @@ fn main() {
.wait()
.expect("flutter_rust_bridge_codegen was not running");
// Flutter pub get
// Run: flutter pub get
let mut command;
cfg_if! {
if #[cfg(target_os="windows")] {
command = Command::new("cmd");
command.args([
OsStr::new("/c"),
OsStr::new("flutter"),
OsStr::new("pub"),
OsStr::new("get"),
]);
} else {
command = Command::new("flutter");
command.args([
OsStr::new("pub"),
OsStr::new("get"),
]);
}
}
let mut child = command
.spawn()
.expect("'flutter pub get' did not execute correctly");
child.wait().expect("'flutter pub get' was not running");
// Build freezed
// Run: flutter pub run build_runner build

View file

@ -468,14 +468,20 @@ impl VeilidLogLevel {
#[derive(Debug, Clone)]
pub enum VeilidUpdate {
Log(VeilidLogLevel, String),
Log {
log_level: VeilidLogLevel,
message: String,
},
Attachment(AttachmentState),
}
impl VeilidUpdate {
fn from_core(veilid_update: veilid_core::VeilidUpdate) -> Self {
match veilid_update {
veilid_core::VeilidUpdate::Log(ll, s) => Self::Log(VeilidLogLevel::from_core(ll), s),
veilid_core::VeilidUpdate::Log { log_level, message } => Self::Log {
log_level: VeilidLogLevel::from_core(log_level),
message,
},
veilid_core::VeilidUpdate::Attachment(attachment) => {
Self::Attachment(AttachmentState::from_core(attachment))
}

File diff suppressed because one or more lines are too long