diff --git a/prover/crates/bin/prover_autoscaler/src/global/watcher.rs b/prover/crates/bin/prover_autoscaler/src/global/watcher.rs index 1b54d332ebb1..6e02c0fe2fdc 100644 --- a/prover/crates/bin/prover_autoscaler/src/global/watcher.rs +++ b/prover/crates/bin/prover_autoscaler/src/global/watcher.rs @@ -6,7 +6,6 @@ use reqwest::{ header::{HeaderMap, HeaderValue, CONTENT_TYPE}, Method, }; - use tokio::sync::Mutex; use url::Url; use zksync_utils::http_with_retries::send_request_with_retries; diff --git a/zkstack_cli/crates/zkstack/Cargo.toml b/zkstack_cli/crates/zkstack/Cargo.toml index 93a78c751b14..85ab8081eaa4 100644 --- a/zkstack_cli/crates/zkstack/Cargo.toml +++ b/zkstack_cli/crates/zkstack/Cargo.toml @@ -55,4 +55,5 @@ anyhow.workspace = true clap_complete.workspace = true dirs.workspace = true ethers.workspace = true +xshell.workspace = true zksync_protobuf_build.workspace = true diff --git a/zkstack_cli/crates/zkstack/build.rs b/zkstack_cli/crates/zkstack/build.rs index bccf5bae89f9..e52e952bf730 100644 --- a/zkstack_cli/crates/zkstack/build.rs +++ b/zkstack_cli/crates/zkstack/build.rs @@ -2,6 +2,7 @@ use std::path::{Path, PathBuf}; use anyhow::{anyhow, Context}; use ethers::contract::Abigen; +use xshell::{cmd, Shell}; const COMPLETION_DIR: &str = "completion"; @@ -14,6 +15,11 @@ fn main() -> anyhow::Result<()> { .write_to_file(outdir.join("consensus_registry_abi.rs")) .context("Failed to write ABI to file")?; + if let Err(e) = build_dependencies() { + println!("cargo:error=It was not possible to install projects dependencies"); + println!("cargo:error={}", e); + } + if let Err(e) = configure_shell_autocompletion() { println!("cargo:warning=It was not possible to install autocomplete scripts. Please generate them manually with `zkstack autocomplete`"); println!("cargo:error={}", e); @@ -130,3 +136,14 @@ impl ShellAutocomplete for clap_complete::Shell { Ok(()) } } + +fn build_dependencies() -> anyhow::Result<()> { + let shell = Shell::new()?; + let code_dir = Path::new("../"); + + let _dir_guard = shell.push_dir(code_dir); + + cmd!(shell, "yarn install") + .run() + .context("Failed to install dependencies") +}