diff --git a/Cargo.lock b/Cargo.lock index 1c8c8132b..7895d1734 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -563,8 +563,7 @@ dependencies = [ [[package]] name = "cairo-lang-casm" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc54b38b6784e2a050c725802d4b5a5634bad32119f8a0a67fccf98e8d5a9f7b" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-utils", "indoc", @@ -577,8 +576,7 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816a6e69bcb48f40513592cebfe5ee80472c93d3dfd4793eaa09d8e2c4dd5489" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-lang-defs", @@ -593,14 +591,14 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "salsa", + "smol_str", "thiserror", ] [[package]] name = "cairo-lang-debug" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee329295640812932a5ca71552d97cfe2057e2d2ef23a6328393c312c7f5367" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-utils", ] @@ -608,8 +606,7 @@ dependencies = [ [[package]] name = "cairo-lang-defs" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08a77ba3c274593f4cfe375b7ecde1353c8489fd8257daf2df85a459126c59a" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -625,8 +622,7 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d9db9eff39d5a91ec1d681d6e52012e5374270120ee55c222211440508e2234" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -637,8 +633,7 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674eb82142b08aea2bca9d711393baea265b64c8a8cbe3a5ae570d84882a4b31" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-utils", "good_lp", @@ -647,8 +642,7 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb697f1d097eeb18ea28fc576c32ad867beade0b47ac2f95ca84026cec025808" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -661,8 +655,7 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e257bb5b687e33a6cd19d6106342e9c37fafca701c7cb9d7173c35ad81db8cc6" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -682,8 +675,7 @@ dependencies = [ [[package]] name = "cairo-lang-language-server" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bb402d0685765f845d0bc5abeaf6659dec0f70f5df4f22f71ea79d7ab1313b" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -711,8 +703,7 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8306cb070322918f9cc18163eb9a847b437cfb2dbf37da5a04dbd41f26f9347e" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -736,8 +727,7 @@ dependencies = [ [[package]] name = "cairo-lang-parser" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "813b3fcfb3db7c137150fb135dc5fb5e8b2b0fcf1343c911e8f282ef6be4896c" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -756,8 +746,7 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e301ea0102f57dd6df3365b44b28397efb68aba069cd218de4e0944bd9a5ff" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -775,8 +764,7 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85aa42c1206b5848bb9ea7e77885ab5196bddcabe55332cc584ced6af9dd459e" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "quote", @@ -786,8 +774,7 @@ dependencies = [ [[package]] name = "cairo-lang-project" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15cc3bfe213c0fd569e7ba2a82200d1d49b1c9677fd4f9426967070bb83489a0" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -800,8 +787,7 @@ dependencies = [ [[package]] name = "cairo-lang-runner" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa31a3ecabb2ecf900c4337e26e3d534ff4f0170183d96be3f72fcfb679ac3e" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "ark-ff", "ark-secp256k1", @@ -830,8 +816,7 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "926f9fa06acd2fceb74f5471ca9c0954acd15c74eaf7f162722748013de0aa7e" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -855,8 +840,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3af31e751df35f8be2be2d692ac027c9d08e91a0aa2c2aff702480535643ef7" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-felt", @@ -881,8 +865,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5d3e18db52e0c2d104bce9d4888c9bb5a0fc5cd87673151941219aaad2d9ce" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -896,8 +879,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc79b2bf4bd56b273ea64125f45dca5dc8583d56bbf8fd4741551f611d4dc7f" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -911,8 +893,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d9ac96139db603c6f351f84a9473e49b6b8bd4036a5fd9179fe8ebcee98a886" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -934,8 +915,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1952c5738d20715d11716ce63ce3e022fdf8563548e4fa84c8dd0379860ca675" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "assert_matches", "cairo-felt", @@ -955,8 +935,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a404f3acbca36d70ac380098f738c217ef768b4089a5aaa1d3d9fa4e3ef0dfca" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -965,12 +944,10 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7a618278918fc83da465ea6c85028009dc386b91ce8ccdcd08c3045255b7ae" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-felt", - "cairo-lang-casm", "cairo-lang-compiler", "cairo-lang-defs", "cairo-lang-diagnostics", @@ -980,14 +957,32 @@ dependencies = [ "cairo-lang-semantic", "cairo-lang-sierra", "cairo-lang-sierra-generator", - "cairo-lang-sierra-to-casm", + "cairo-lang-starknet-classes", "cairo-lang-syntax", "cairo-lang-utils", "const_format", - "convert_case", "indent", "indoc", "itertools 0.11.0", + "once_cell", + "serde", + "serde_json", + "smol_str", + "thiserror", +] + +[[package]] +name = "cairo-lang-starknet-classes" +version = "2.5.3" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" +dependencies = [ + "cairo-felt", + "cairo-lang-casm", + "cairo-lang-sierra", + "cairo-lang-sierra-to-casm", + "cairo-lang-utils", + "convert_case", + "itertools 0.11.0", "num-bigint", "num-integer", "num-traits 0.2.17", @@ -1003,8 +998,7 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08063b53ae8bc5c2d30b2a32a1abf807ffc082fe5f297a61370e4e540857d1a" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1019,8 +1013,7 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dc563a3457190f1f9d371fbfbb67e7f99675c54dcf9cb2f260e5aecb5ed3a73" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "genco", "xshell", @@ -1029,8 +1022,7 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "889e2324b7969757e512e09f44eaecb94d9b3cc5892cd2b5649d81de9d750493" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-felt", @@ -1044,6 +1036,7 @@ dependencies = [ "cairo-lang-sierra", "cairo-lang-sierra-generator", "cairo-lang-starknet", + "cairo-lang-starknet-classes", "cairo-lang-syntax", "cairo-lang-utils", "indoc", @@ -1056,8 +1049,7 @@ dependencies = [ [[package]] name = "cairo-lang-test-runner" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987cd7b124ef3adb30467c96c39365ef4b95736c6315e55e6abaa3c5596acf48" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "anyhow", "cairo-felt", @@ -1065,6 +1057,7 @@ dependencies = [ "cairo-lang-filesystem", "cairo-lang-runner", "cairo-lang-sierra", + "cairo-lang-sierra-generator", "cairo-lang-sierra-to-casm", "cairo-lang-starknet", "cairo-lang-test-plugin", @@ -1078,8 +1071,7 @@ dependencies = [ [[package]] name = "cairo-lang-utils" version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f3de16afa605c6cc491661bc2dab71da10b379af0fdb7176f4f27e08d6286e" +source = "git+https://github.com/starkware-libs/cairo?rev=7bf91178ad4a775943da53f1dab94068e5d70e31#7bf91178ad4a775943da53f1dab94068e5d70e31" dependencies = [ "env_logger", "hashbrown 0.14.3", @@ -4461,6 +4453,7 @@ dependencies = [ "cairo-lang-sierra", "cairo-lang-sierra-to-casm", "cairo-lang-starknet", + "cairo-lang-starknet-classes", "cairo-lang-test-plugin", "cairo-lang-utils", "camino", diff --git a/Cargo.toml b/Cargo.toml index c33aea1e1..7d230bc35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,26 +31,27 @@ assert_fs = "1" async-trait = "0.1" axum = { version = "0.6", features = ["http2"] } cairo-felt = "0.9.1" -cairo-lang-casm = "2.5.3" -cairo-lang-compiler = "2.5.3" -cairo-lang-debug = "2.5.3" -cairo-lang-defs = "2.5.3" -cairo-lang-diagnostics = "2.5.3" -cairo-lang-filesystem = "2.5.3" -cairo-lang-formatter = "2.5.3" -cairo-lang-language-server = "2.5.3" -cairo-lang-lowering = "2.5.3" -cairo-lang-project = "2.5.3" -cairo-lang-runner = "2.5.3" -cairo-lang-semantic = "2.5.3" -cairo-lang-sierra = "2.5.3" -cairo-lang-sierra-generator = "2.5.3" -cairo-lang-sierra-to-casm = "2.5.3" -cairo-lang-starknet = "2.5.3" -cairo-lang-syntax = "2.5.3" -cairo-lang-test-plugin = "2.5.3" -cairo-lang-test-runner = "2.5.3" -cairo-lang-utils = { version = "2.5.3", features = ["env_logger"] } +cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31" } +cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "7bf91178ad4a775943da53f1dab94068e5d70e31", version = "2.5.3", features = ["env_logger"] } camino = { version = "1", features = ["serde1"] } cargo_metadata = ">=0.18" clap = { version = "4", features = ["derive", "env", "string"] } diff --git a/extensions/scarb-cairo-test/src/main.rs b/extensions/scarb-cairo-test/src/main.rs index d7de6332c..20d44c30c 100644 --- a/extensions/scarb-cairo-test/src/main.rs +++ b/extensions/scarb-cairo-test/src/main.rs @@ -2,7 +2,7 @@ use std::{env, fs}; use anyhow::{Context, Result}; use cairo_lang_test_plugin::TestCompilation; -use cairo_lang_test_runner::{CompiledTestRunner, TestRunConfig}; +use cairo_lang_test_runner::{CompiledTestRunner, RunProfilerConfig, TestRunConfig}; use clap::Parser; use scarb_metadata::{Metadata, MetadataCommand, PackageMetadata, ScarbCommand, TargetMetadata}; @@ -66,10 +66,10 @@ fn main() -> Result<()> { filter: args.filter.clone(), include_ignored: args.include_ignored, ignored: args.ignored, - run_profiler: false, + run_profiler: RunProfilerConfig::None, }; let runner = CompiledTestRunner::new(test_compilation, config); - runner.run()?; + runner.run(None)?; println!(); } } diff --git a/extensions/scarb-snforge-test-collector/src/compilation/test_collector.rs b/extensions/scarb-snforge-test-collector/src/compilation/test_collector.rs index e6e450450..9c56f3bb2 100644 --- a/extensions/scarb-snforge-test-collector/src/compilation/test_collector.rs +++ b/extensions/scarb-snforge-test-collector/src/compilation/test_collector.rs @@ -159,7 +159,7 @@ pub fn collect_tests( }) .collect(); - let sierra_program = replace_sierra_ids_in_program(db, &sierra_program.0); + let sierra_program = replace_sierra_ids_in_program(db, &sierra_program.program); validate_tests(sierra_program.clone(), &collected_tests)?; diff --git a/scarb/Cargo.toml b/scarb/Cargo.toml index 910400a7f..92d883bb3 100644 --- a/scarb/Cargo.toml +++ b/scarb/Cargo.toml @@ -25,6 +25,7 @@ cairo-lang-semantic.workspace = true cairo-lang-sierra-to-casm.workspace = true cairo-lang-sierra.workspace = true cairo-lang-starknet.workspace = true +cairo-lang-starknet-classes.workspace = true cairo-lang-test-plugin.workspace = true cairo-lang-utils.workspace = true camino.workspace = true diff --git a/scarb/src/compiler/compilers/starknet_contract.rs b/scarb/src/compiler/compilers/starknet_contract.rs index 47b69ecf3..9fa9929b8 100644 --- a/scarb/src/compiler/compilers/starknet_contract.rs +++ b/scarb/src/compiler/compilers/starknet_contract.rs @@ -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::allowed_libfuncs::{ - validate_compatible_sierra_version, AllowedLibfuncsError, ListSelector, - BUILTIN_EXPERIMENTAL_LIBFUNCS_LIST, -}; -use cairo_lang_starknet::casm_contract_class::CasmContractClass; +use cairo_lang_starknet::compile::compile_prepared_db; use cairo_lang_starknet::contract::{find_contracts, ContractDeclaration}; -use cairo_lang_starknet::contract_class::{compile_prepared_db, ContractClass}; +use cairo_lang_starknet_classes::allowed_libfuncs::{ + 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_utils::{Upcast, UpcastMut}; use indoc::{formatdoc, writedoc}; use itertools::{izip, Itertools}; @@ -390,7 +390,7 @@ fn check_allowed_libfuncs( let mut found_disallowed = false; for (decl, class) in zip(contracts, classes) { - match validate_compatible_sierra_version(class, list_selector.clone()) { + match class.validate_version_compatible(list_selector.clone()) { Ok(()) => {} Err(AllowedLibfuncsError::UnsupportedLibfunc { diff --git a/scarb/src/version.rs b/scarb/src/version.rs index cd4bea7a9..a46d09f35 100644 --- a/scarb/src/version.rs +++ b/scarb/src/version.rs @@ -132,7 +132,7 @@ pub fn get() -> VersionInfo { }; static SIERRA_VERSION: Lazy = Lazy::new(|| { - cairo_lang_starknet::compiler_version::current_sierra_version_id().to_string() + cairo_lang_starknet_classes::compiler_version::current_sierra_version_id().to_string() }); let sierra = SierraVersionInfo { diff --git a/scarb/tests/build_starknet_contract.rs b/scarb/tests/build_starknet_contract.rs index 76a5ee036..d7774494d 100644 --- a/scarb/tests/build_starknet_contract.rs +++ b/scarb/tests/build_starknet_contract.rs @@ -1,7 +1,7 @@ use assert_fs::fixture::ChildPath; use assert_fs::prelude::*; -use cairo_lang_starknet::casm_contract_class::CasmContractClass; -use cairo_lang_starknet::contract_class::ContractClass; +use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; +use cairo_lang_starknet_classes::contract_class::ContractClass; use indoc::{formatdoc, indoc}; use itertools::Itertools; use predicates::prelude::*; diff --git a/scarb/tests/build_starknet_external_contracts.rs b/scarb/tests/build_starknet_external_contracts.rs index 87ce79675..afb9414a3 100644 --- a/scarb/tests/build_starknet_external_contracts.rs +++ b/scarb/tests/build_starknet_external_contracts.rs @@ -1,7 +1,7 @@ use assert_fs::fixture::ChildPath; use assert_fs::prelude::*; use assert_fs::TempDir; -use cairo_lang_starknet::contract_class::ContractClass; +use cairo_lang_starknet_classes::contract_class::ContractClass; use indoc::{formatdoc, indoc}; use itertools::Itertools;