Skip to content

Commit

Permalink
Merge pull request #191 from kinode-dao/v0.6.7
Browse files Browse the repository at this point in the history
v0.6.7
  • Loading branch information
nick1udwig authored Jul 15, 2024
2 parents 778167d + dc8bda6 commit 396587e
Show file tree
Hide file tree
Showing 29 changed files with 390 additions and 541 deletions.
121 changes: 1 addition & 120 deletions Cargo.lock

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

8 changes: 1 addition & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kit"
version = "0.6.6"
version = "0.6.7"
edition = "2021"

[build-dependencies]
Expand All @@ -13,29 +13,23 @@ clap = { version = "4.4", features = ["cargo", "string"] }
color-eyre = { version = "0.6", features = ["capture-spantrace"] }
dirs = "5.0"
fs-err = "2.11"
futures-util = "0.3"
hex = "0.4"
kinode_process_lib = { git = "https://github.com/kinode-dao/process_lib.git", rev = "7eb3a04" }
nix = { version = "0.27", features = ["process", "signal", "term"] }
regex = "1"
reqwest = { version = "0.11", features = ["json"] }
rmp-serde = "1.1.2"
semver = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sha2 = "0.10.8"
ssh2 = "0.9.4"
thiserror = "1.0"
tokio = { version = "1.28", features = [
"fs",
"macros",
"process",
"rt-multi-thread",
"signal",
"sync",
"time",
] }
tokio-tungstenite = "*"
toml = "0.8"
tracing = "0.1"
tracing-appender = "0.2"
Expand Down
20 changes: 19 additions & 1 deletion src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ async fn compile_package_and_ui(
features: &str,
url: Option<String>,
default_world: Option<String>,
download_from: Option<&str>,
verbose: bool,
) -> Result<()> {
compile_and_copy_ui(package_dir, valid_node, verbose).await?;
Expand All @@ -516,6 +517,7 @@ async fn compile_package_and_ui(
features,
url,
default_world,
download_from,
verbose,
)
.await?;
Expand All @@ -535,7 +537,15 @@ async fn build_wit_dir(
};
download_file(wit_url, &wit_dir.join("kinode.wit")).await?;
for (file_name, contents) in apis {
fs::write(wit_dir.join(file_name), contents)?;
let destination = wit_dir.join(file_name);
if destination.exists() {
// check if contents have not changed -> no-op
let old_contents = fs::read(&destination)?;
if &old_contents == contents {
continue;
}
}
fs::write(&destination, contents)?;
}
Ok(())
}
Expand Down Expand Up @@ -579,6 +589,7 @@ async fn fetch_dependencies(
apis: &mut HashMap<String, Vec<u8>>,
wasm_paths: &mut HashSet<PathBuf>,
url: String,
download_from: Option<&str>,
) -> Result<()> {
for dependency in dependencies {
if dependency.parse::<PackageId>().is_err() {
Expand All @@ -590,6 +601,7 @@ async fn fetch_dependencies(
None,
Some(dependency),
&url,
download_from,
false,
).await? else {
return Err(eyre!(
Expand Down Expand Up @@ -735,6 +747,7 @@ async fn compile_package(
features: &str,
url: Option<String>,
default_world: Option<String>,
download_from: Option<&str>,
verbose: bool,
) -> Result<()> {
let metadata = read_metadata(package_dir)?;
Expand Down Expand Up @@ -798,6 +811,7 @@ async fn compile_package(
&mut apis,
&mut wasm_paths,
url.clone(),
download_from,
).await?;
}
}
Expand Down Expand Up @@ -879,6 +893,7 @@ pub async fn execute(
skip_deps_check: bool,
features: &str,
url: Option<String>,
download_from: Option<&str>,
default_world: Option<String>,
verbose: bool,
) -> Result<()> {
Expand All @@ -905,6 +920,7 @@ pub async fn execute(
features,
url,
default_world,
download_from,
verbose,
)
.await
Expand All @@ -917,6 +933,7 @@ pub async fn execute(
features,
url,
default_world,
download_from,
verbose,
)
.await;
Expand All @@ -936,6 +953,7 @@ pub async fn execute(
features,
url,
default_world,
download_from,
verbose,
)
.await
Expand Down
2 changes: 2 additions & 0 deletions src/build_start_package/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub async fn execute(
url: &str,
skip_deps_check: bool,
features: &str,
download_from: Option<&str>,
default_world: Option<String>,
verbose: bool,
) -> Result<()> {
Expand All @@ -24,6 +25,7 @@ pub async fn execute(
skip_deps_check,
features,
Some(url.into()),
download_from,
default_world,
verbose,
)
Expand Down
Loading

0 comments on commit 396587e

Please sign in to comment.