Skip to content

Commit

Permalink
Revert "Update cairo (#1115)"
Browse files Browse the repository at this point in the history
This reverts commit 719855e.
  • Loading branch information
maciektr committed Feb 14, 2024
1 parent a28b779 commit 878c9ac
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions extensions/scarb-cairo-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{env, fs};

use anyhow::{Context, Result};
use cairo_lang_test_plugin::TestCompilation;
use cairo_lang_test_runner::{CompiledTestRunner, RunProfilerConfig, TestRunConfig};
use cairo_lang_test_runner::{CompiledTestRunner, TestRunConfig};
use clap::Parser;

use scarb_metadata::{Metadata, MetadataCommand, PackageMetadata, ScarbCommand, TargetMetadata};
Expand Down Expand Up @@ -66,10 +66,10 @@ fn main() -> Result<()> {
filter: args.filter.clone(),
include_ignored: args.include_ignored,
ignored: args.ignored,
run_profiler: RunProfilerConfig::None,
run_profiler: false,
};
let runner = CompiledTestRunner::new(test_compilation, config);
runner.run(None)?;
runner.run()?;
println!();
}
}
Expand Down
14 changes: 7 additions & 7 deletions scarb/src/compiler/compilers/starknet_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ use anyhow::{bail, ensure, Context, Result};
use cairo_lang_compiler::db::RootDatabase;
use cairo_lang_filesystem::ids::{CrateId, CrateLongId};
use cairo_lang_semantic::db::SemanticGroup;
use cairo_lang_starknet::compile::compile_prepared_db;
use cairo_lang_starknet::contract::{find_contracts, ContractDeclaration};
use cairo_lang_starknet_classes::allowed_libfuncs::{
AllowedLibfuncsError, ListSelector, BUILTIN_EXPERIMENTAL_LIBFUNCS_LIST,
use cairo_lang_starknet::allowed_libfuncs::{
validate_compatible_sierra_version, AllowedLibfuncsError, ListSelector,
BUILTIN_EXPERIMENTAL_LIBFUNCS_LIST,
};
use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass;
use cairo_lang_starknet_classes::contract_class::ContractClass;
use cairo_lang_starknet::casm_contract_class::CasmContractClass;
use cairo_lang_starknet::contract::{find_contracts, ContractDeclaration};
use cairo_lang_starknet::contract_class::{compile_prepared_db, ContractClass};
use cairo_lang_utils::{Upcast, UpcastMut};
use indoc::{formatdoc, writedoc};
use itertools::{izip, Itertools};
Expand Down Expand Up @@ -390,7 +390,7 @@ fn check_allowed_libfuncs(

let mut found_disallowed = false;
for (decl, class) in zip(contracts, classes) {
match class.validate_version_compatible(list_selector.clone()) {
match validate_compatible_sierra_version(class, list_selector.clone()) {
Ok(()) => {}

Err(AllowedLibfuncsError::UnsupportedLibfunc {
Expand Down
2 changes: 1 addition & 1 deletion scarb/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn get() -> VersionInfo {
};

static SIERRA_VERSION: Lazy<String> = Lazy::new(|| {
cairo_lang_starknet_classes::compiler_version::current_sierra_version_id().to_string()
cairo_lang_starknet::compiler_version::current_sierra_version_id().to_string()
});

let sierra = SierraVersionInfo {
Expand Down
4 changes: 2 additions & 2 deletions scarb/tests/build_starknet_contract.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use assert_fs::fixture::ChildPath;
use assert_fs::prelude::*;
use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass;
use cairo_lang_starknet_classes::contract_class::ContractClass;
use cairo_lang_starknet::casm_contract_class::CasmContractClass;
use cairo_lang_starknet::contract_class::ContractClass;
use indoc::{formatdoc, indoc};
use itertools::Itertools;
use predicates::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletion scarb/tests/build_starknet_external_contracts.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use assert_fs::fixture::ChildPath;
use assert_fs::prelude::*;
use assert_fs::TempDir;
use cairo_lang_starknet_classes::contract_class::ContractClass;
use cairo_lang_starknet::contract_class::ContractClass;
use indoc::{formatdoc, indoc};
use itertools::Itertools;

Expand Down

0 comments on commit 878c9ac

Please sign in to comment.