Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
8 changes: 4 additions & 4 deletions src/new/templates/rust/ui/chat/chat/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct NewMessage {
type MessageArchive = HashMap<String, Vec<ChatMessage>>;

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(
Expand All @@ -44,7 +44,7 @@ fn handle_http_server_request(
) -> anyhow::Result<()> {
let Ok(request) = serde_json::from_slice::<HttpServerRequest>(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(());
};

Expand Down Expand Up @@ -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();
Expand All @@ -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())
Expand Down
5 changes: 4 additions & 1 deletion src/run_tests/cleanup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 13 additions & 2 deletions src/setup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down Expand Up @@ -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() {
Expand Down