From 573c4a88c645e4ea932c61a96b85addcd0349484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Istv=C3=A1n=20B=C3=ADr=C3=B3?= Date: Tue, 1 Jul 2025 15:35:49 +0200 Subject: [PATCH 1/3] fix wit copy --- crates/wasm-rquickjs/src/lib.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/wasm-rquickjs/src/lib.rs b/crates/wasm-rquickjs/src/lib.rs index 4c73874..df47cff 100644 --- a/crates/wasm-rquickjs/src/lib.rs +++ b/crates/wasm-rquickjs/src/lib.rs @@ -265,13 +265,10 @@ impl<'a> ImportedInterface<'a> { /// Recursively copies a WIT directory to `/wit`. fn copy_wit_directory(wit: &Utf8Path, output: &Utf8Path) -> anyhow::Result<()> { - let options = CopyOptions { - overwrite: true, - copy_inside: true, - ..Default::default() - }; - - fs_extra::copy_items(&[wit], output, &options).context("Failed to copy WIT directory")?; + fs_extra::dir::create(output, true) + .context("Failed to create and erase output WIT directory")?; + fs_extra::dir::copy(&wit, output, &CopyOptions::new().content_only(true)) + .context("Failed to copy WIT directory")?; Ok(()) } From 65722949816c9b29e3c3fb1b3dc0d8c579604e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Istv=C3=A1n=20B=C3=ADr=C3=B3?= Date: Wed, 2 Jul 2025 14:28:22 +0200 Subject: [PATCH 2/3] clippy --- crates/wasm-rquickjs/skeleton/src/internal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasm-rquickjs/skeleton/src/internal.rs b/crates/wasm-rquickjs/skeleton/src/internal.rs index 9d6d451..a6cf758 100644 --- a/crates/wasm-rquickjs/skeleton/src/internal.rs +++ b/crates/wasm-rquickjs/skeleton/src/internal.rs @@ -268,7 +268,7 @@ where match e { Error::Exception => { let exception = ctx.catch(); - panic! ("Exception during awaiting call result: {exception:?}") + panic! ("Exception during awaiting call result for {function_path}: {exception:?}", function_path=function_path.join(".")) } _ => { panic ! ("Error during awaiting call result: {e:?}") From b6c54db23654dc5050bfdc82d61d33a5293878a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Istv=C3=A1n=20B=C3=ADr=C3=B3?= Date: Wed, 2 Jul 2025 17:13:16 +0200 Subject: [PATCH 3/3] clippy --- crates/wasm-rquickjs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasm-rquickjs/src/lib.rs b/crates/wasm-rquickjs/src/lib.rs index df47cff..a78662d 100644 --- a/crates/wasm-rquickjs/src/lib.rs +++ b/crates/wasm-rquickjs/src/lib.rs @@ -267,7 +267,7 @@ impl<'a> ImportedInterface<'a> { fn copy_wit_directory(wit: &Utf8Path, output: &Utf8Path) -> anyhow::Result<()> { fs_extra::dir::create(output, true) .context("Failed to create and erase output WIT directory")?; - fs_extra::dir::copy(&wit, output, &CopyOptions::new().content_only(true)) + fs_extra::dir::copy(wit, output, &CopyOptions::new().content_only(true)) .context("Failed to copy WIT directory")?; Ok(())