Skip to content

Commit

Permalink
fix wasm-bindgen verify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelleyrtp committed Dec 5, 2024
1 parent 0974550 commit e6f76c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/cli/src/build/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ impl BuildRequest {
.await?;
}

let our_wasm_bindgen_version = wasm_bindgen_shared::version();
match self.krate.wasm_bindgen_version() {
Some(version) if version == wasm_bindgen_shared::SCHEMA_VERSION => {
Some(version) if version == our_wasm_bindgen_version => {
tracing::debug!("wasm-bindgen version {version} is compatible with dioxus-cli ✅");
},
Some(version) => {
tracing::warn!(
"wasm-bindgen version {version} is not compatible with the cli crate. Attempting to upgrade the target wasm-bindgen crate manually..."
"wasm-bindgen version {version} is not compatible with the cli crate ({}). Attempting to upgrade the target wasm-bindgen crate manually...",
our_wasm_bindgen_version
);

let output = Command::new("cargo")
Expand All @@ -65,7 +67,7 @@ impl BuildRequest {
"-p",
"wasm-bindgen",
"--precise",
&wasm_bindgen_shared::version(),
&our_wasm_bindgen_version,
])
.stderr(Stdio::piped())
.stdout(Stdio::piped())
Expand Down

0 comments on commit e6f76c7

Please sign in to comment.