Skip to content

Commit

Permalink
chore(blockifier): use infra utils dir in cairo compile
Browse files Browse the repository at this point in the history
  • Loading branch information
ArniStarkware committed Dec 3, 2024
1 parent 56ca608 commit 8bf9f76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/blockifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cairo-native = { workspace = true, optional = true }
cairo-vm.workspace = true
derive_more.workspace = true
indexmap.workspace = true
infra_utils.workspace = true
itertools.workspace = true
keccak.workspace = true
log.workspace = true
Expand Down
7 changes: 3 additions & 4 deletions crates/blockifier/src/test_utils/cairo_compile.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use std::io::Write;
use std::path::{Path, PathBuf};
use std::path::PathBuf;
use std::process::{Command, Output};
use std::{env, fs};

use cached::proc_macro::cached;
use infra_utils::path::cargo_manifest_dir;
use serde::{Deserialize, Serialize};
use tempfile::NamedTempFile;

Expand Down Expand Up @@ -69,9 +70,7 @@ pub fn cairo1_compiler_tag() -> String {
/// overridden by the environment variable (otherwise, the default is used).
fn local_cairo1_compiler_repo_path() -> PathBuf {
// Location of blockifier's Cargo.toml.
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();

Path::new(&manifest_dir).join(
cargo_manifest_dir().unwrap().join(
env::var(CAIRO1_REPO_RELATIVE_PATH_OVERRIDE_ENV_VAR)
.unwrap_or_else(|_| DEFAULT_CAIRO1_REPO_RELATIVE_PATH.into()),
)
Expand Down

0 comments on commit 8bf9f76

Please sign in to comment.