From edc89200e0949c2d288ae4f690f220f018d33993 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 28 Mar 2025 14:47:55 -0700 Subject: [PATCH 1/5] bump to version 1.0.2 --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c44b7ba3..2b5d746f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "kit" -version = "1.0.1" +version = "1.0.2" dependencies = [ "alloy", "alloy-sol-macro", diff --git a/Cargo.toml b/Cargo.toml index e89358f8..88c31954 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kit" authors = ["Sybil Technologies AG"] -version = "1.0.1" +version = "1.0.2" edition = "2021" description = "Development toolkit for Hyperware" homepage = "https://hyperware.ai" From effc762c59214d7aa95a2cb25caf363d8093052e Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Fri, 28 Mar 2025 14:48:09 -0700 Subject: [PATCH 2/5] new: fix chat ui template --- src/new/templates/rust/ui/chat/chat/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/new/templates/rust/ui/chat/chat/src/lib.rs b/src/new/templates/rust/ui/chat/chat/src/lib.rs index fc134747..5ce405e4 100644 --- a/src/new/templates/rust/ui/chat/chat/src/lib.rs +++ b/src/new/templates/rust/ui/chat/chat/src/lib.rs @@ -33,7 +33,7 @@ struct NewMessage { type MessageArchive = HashMap>; fn make_http_address(our: &Address) -> Address { - Address::from((our.node(), "http_server", "distro", "sys")) + Address::from((our.node(), "http-server", "distro", "sys")) } fn handle_http_server_request( @@ -44,7 +44,7 @@ fn handle_http_server_request( ) -> anyhow::Result<()> { let Ok(request) = serde_json::from_slice::(body) else { // Fail quietly if we can't parse the request - info!("couldn't parse message from http_server: {body:?}"); + info!("couldn't parse message from http-server: {body:?}"); return Ok(()); }; From 4ea812a8a0956dbc7920fb373332fbd73fec14b4 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 3 Apr 2025 12:04:18 -0700 Subject: [PATCH 3/5] cleanup: dont output on EIO --- src/run_tests/cleanup.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/run_tests/cleanup.rs b/src/run_tests/cleanup.rs index e7c54c94..d5993108 100644 --- a/src/run_tests/cleanup.rs +++ b/src/run_tests/cleanup.rs @@ -108,7 +108,10 @@ pub async fn cleanup( // for `run-tests` that exited early by, e.g., a user input // Ctrl+C. if let Err(e) = nix::unistd::write(master_fd.as_raw_fd(), b"\x03") { - error!("failed to send SIGINT to node: {:?}", e); + match e { + nix::Error::EIO => {} + _ => error!("failed to send SIGINT to node: {:?}", e), + } } } else { clean_process_by_pid(*process_id); From 4940697153473ae0ef9b0244ef9e1442df39a5f9 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Thu, 3 Apr 2025 15:51:15 -0700 Subject: [PATCH 4/5] setup: dont bail on fake broadcast sender drop --- src/setup/mod.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/setup/mod.rs b/src/setup/mod.rs index 196544e2..0cf66ab4 100644 --- a/src/setup/mod.rs +++ b/src/setup/mod.rs @@ -204,7 +204,7 @@ fn call_with_nvm(arg: &str, verbose: bool) -> Result<()> { #[instrument(level = "trace", skip_all)] fn call_rustup(arg: &str, verbose: bool) -> Result<()> { run_command( - Command::new("bash").args(&["-c", &format!("rustup {}", arg)]), + Command::new("bash").args(&["-c", &format!("rustup +stable {}", arg)]), verbose, )?; Ok(()) @@ -453,7 +453,18 @@ pub async fn get_deps( // Process the response let response = tokio::select! { Some(response) = receiver.recv() => response, - _ = recv_kill.recv() => return Err(eyre!("got exit code")), + k = recv_kill.recv() => { + match k { + Err(tokio::sync::broadcast::error::RecvError::Closed) => { + // some systems drop the fake sender produced in build/mod.rs:57 + // make_fake_kill_chan() and so we handle this by ignoring the + // Closed message that comes through + // https://docs.rs/tokio/latest/tokio/sync/broadcast/struct.Receiver.html#method.recv + receiver.recv().await.unwrap() + } + _ => return Err(eyre!("got exit code")), + } + } }; let response = response.trim().to_lowercase(); match response.as_str() { From 01d609375b3107ae4fdcba661b4670fa304feb95 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Mon, 7 Apr 2025 15:53:20 -0700 Subject: [PATCH 5/5] new: fix chat ui template --- src/new/templates/rust/ui/chat/chat/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/new/templates/rust/ui/chat/chat/src/lib.rs b/src/new/templates/rust/ui/chat/chat/src/lib.rs index 5ce405e4..a8d4b455 100644 --- a/src/new/templates/rust/ui/chat/chat/src/lib.rs +++ b/src/new/templates/rust/ui/chat/chat/src/lib.rs @@ -214,7 +214,7 @@ fn handle_message( call_init!(init); fn init(our: Address) { - init_logging(&our, Level::DEBUG, Level::INFO, None, None).unwrap(); + init_logging(Level::DEBUG, Level::INFO, None, None, None).unwrap(); info!("begin"); let mut message_archive = HashMap::new(); @@ -223,7 +223,7 @@ fn init(our: Address) { // Bind UI files to routes with index.html at "/"; API to /messages; WS to "/" server - .serve_ui(&our, "ui", vec!["/"], HttpBindingConfig::default()) + .serve_ui("ui", vec!["/"], HttpBindingConfig::default()) .expect("failed to serve UI"); server .bind_http_path(HTTP_API_PATH, HttpBindingConfig::default())