diff --git a/Cargo.lock b/Cargo.lock index 3c30833ad..7f41c1a65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -567,8 +567,8 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-utils", "indoc", @@ -580,8 +580,8 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-defs", @@ -605,16 +605,16 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -629,8 +629,8 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -640,8 +640,8 @@ dependencies = [ [[package]] name = "cairo-lang-doc" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-defs", "cairo-lang-filesystem", @@ -655,8 +655,8 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-utils", "good_lp", @@ -664,8 +664,8 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -679,8 +679,8 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -699,8 +699,8 @@ dependencies = [ [[package]] name = "cairo-lang-language-server" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -735,8 +735,8 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -751,6 +751,7 @@ dependencies = [ "itertools 0.12.1", "log", "num-bigint", + "num-integer", "num-traits 0.2.19", "rust-analyzer-salsa", "smol_str", @@ -799,8 +800,8 @@ checksum = "c49906d6b1c215e5814be7c5c65ecf2328898b335bee8c2409ec07cfb5530daf" [[package]] name = "cairo-lang-parser" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -818,8 +819,8 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -836,8 +837,8 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "quote", @@ -846,8 +847,8 @@ dependencies = [ [[package]] name = "cairo-lang-project" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -859,8 +860,8 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "ark-ff", "ark-secp256k1", @@ -889,8 +890,8 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -914,8 +915,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-utils", @@ -940,8 +941,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -955,8 +956,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -970,8 +971,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -993,8 +994,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -1013,8 +1014,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -1022,8 +1023,8 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1051,8 +1052,8 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -1073,8 +1074,8 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1088,8 +1089,8 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "genco", "xshell", @@ -1097,8 +1098,8 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1123,8 +1124,8 @@ dependencies = [ [[package]] name = "cairo-lang-test-runner" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1145,8 +1146,8 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1157,8 +1158,8 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=323ea7e281f8bda571e678a0aaa928247b6e618d#323ea7e281f8bda571e678a0aaa928247b6e618d" +version = "2.8.4" +source = "git+https://github.com/starkware-libs/cairo?rev=fbb54c8bcddbbddc69cf267df277b96ff613b52a#fbb54c8bcddbbddc69cf267df277b96ff613b52a" dependencies = [ "env_logger", "hashbrown 0.14.5", @@ -4547,7 +4548,7 @@ dependencies = [ [[package]] name = "scarb" -version = "2.8.2" +version = "2.8.4" dependencies = [ "anyhow", "assert_fs", @@ -4638,7 +4639,7 @@ dependencies = [ [[package]] name = "scarb-build-metadata" -version = "2.8.2" +version = "2.8.4" dependencies = [ "cargo_metadata", "semver", @@ -4646,7 +4647,7 @@ dependencies = [ [[package]] name = "scarb-cairo-language-server" -version = "2.8.2" +version = "2.8.4" dependencies = [ "assert_fs", "cairo-lang-language-server", @@ -4658,7 +4659,7 @@ dependencies = [ [[package]] name = "scarb-cairo-run" -version = "2.8.2" +version = "2.8.4" dependencies = [ "anyhow", "assert_fs", @@ -4680,7 +4681,7 @@ dependencies = [ [[package]] name = "scarb-cairo-test" -version = "2.8.2" +version = "2.8.4" dependencies = [ "anyhow", "assert_fs", @@ -4700,7 +4701,7 @@ dependencies = [ [[package]] name = "scarb-doc" -version = "2.8.2" +version = "2.8.4" dependencies = [ "anyhow", "assert_fs", @@ -4758,7 +4759,7 @@ dependencies = [ [[package]] name = "scarb-snforge-test-collector" -version = "2.8.2" +version = "2.8.4" dependencies = [ "anyhow", "assert_fs", diff --git a/Cargo.toml b/Cargo.toml index c86cc47f1..e8f100dbf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ members = [ "resolver" = "2" [workspace.package] -version = "2.8.2" +version = "2.8.4" edition = "2021" authors = ["Software Mansion "] @@ -35,30 +35,30 @@ anyhow = "1" assert_fs = "1" async-trait = "0.1" axum = { version = "0.6", features = ["http2"] } -cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-doc = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-parser = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d" } -cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "323ea7e281f8bda571e678a0aaa928247b6e618d", features = ["env_logger"] } +cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-doc = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-parser = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a" } +cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "fbb54c8bcddbbddc69cf267df277b96ff613b52a", 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-run/tests/examples.rs b/extensions/scarb-cairo-run/tests/examples.rs index 07e62dfbd..328d1e87e 100644 --- a/extensions/scarb-cairo-run/tests/examples.rs +++ b/extensions/scarb-cairo-run/tests/examples.rs @@ -97,7 +97,7 @@ fn can_limit_gas() { Finished `dev` profile target(s) in [..] Running hello_world Run completed successfully, returning [987] - Remaining gas: 58060 + Remaining gas: 59760 "#}); } diff --git a/extensions/scarb-cairo-test/tests/build.rs b/extensions/scarb-cairo-test/tests/build.rs index 2263b4068..a248a6c9b 100644 --- a/extensions/scarb-cairo-test/tests/build.rs +++ b/extensions/scarb-cairo-test/tests/build.rs @@ -237,12 +237,12 @@ fn integration_tests() { [..]Finished `dev` profile target(s) in [..] testing hello ... running 2 tests - test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 42440) - test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 42440) + test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740) + test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740) test result: ok. 2 passed; 0 failed; 0 ignored; 0 filtered out; running 1 test - test hello::tests::it_works ... ok (gas usage est.: 42440) + test hello::tests::it_works ... ok (gas usage est.: 40740) test result: ok. 1 passed; 0 failed; 0 ignored; 0 filtered out; "#}); @@ -336,7 +336,7 @@ fn can_choose_test_kind_to_run() { [..]Finished `dev` profile target(s) in [..] testing hello ... running 1 test - test hello::tests::it_works ... ok (gas usage est.: 42440) + test hello::tests::it_works ... ok (gas usage est.: 40740) test result: ok. 1 passed; 0 failed; 0 ignored; 0 filtered out; "#}); @@ -352,8 +352,8 @@ fn can_choose_test_kind_to_run() { [..]Finished `dev` profile target(s) in [..] testing hello ... running 2 tests - test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 42440) - test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 42440) + test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740) + test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740) test result: ok. 2 passed; 0 failed; 0 ignored; 0 filtered out; "#}); diff --git a/scarb/src/compiler/compilers/starknet_contract/compiler.rs b/scarb/src/compiler/compilers/starknet_contract/compiler.rs index de75ab178..a60459d05 100644 --- a/scarb/src/compiler/compilers/starknet_contract/compiler.rs +++ b/scarb/src/compiler/compilers/starknet_contract/compiler.rs @@ -97,18 +97,19 @@ impl Compiler for StarknetContractCompiler { let compiler_config = build_compiler_config(db, &unit, &main_crate_ids, ws); + let contracts = find_project_contracts( + db.upcast_mut(), + ws.config().ui(), + &unit, + main_crate_ids.clone(), + props.build_external_contracts.clone(), + )?; + let CompiledContracts { contract_paths, contracts, classes, - } = get_compiled_contracts( - main_crate_ids, - props.build_external_contracts.clone(), - compiler_config, - &unit, - db, - ws, - )?; + } = get_compiled_contracts(contracts, compiler_config, db)?; check_allowed_libfuncs(&props, &contracts, &classes, db, &unit, ws)?; @@ -148,21 +149,10 @@ pub struct CompiledContracts { } pub fn get_compiled_contracts( - main_crate_ids: Vec, - build_external_contracts: Option>, + contracts: Vec, compiler_config: CompilerConfig<'_>, - unit: &CairoCompilationUnit, db: &mut RootDatabase, - ws: &Workspace<'_>, ) -> Result { - let contracts = find_project_contracts( - db.upcast_mut(), - ws.config().ui(), - unit, - main_crate_ids, - build_external_contracts, - )?; - let contract_paths = contracts .iter() .map(|decl| decl.module_id().full_path(db.upcast_mut())) @@ -180,7 +170,7 @@ pub fn get_compiled_contracts( }) } -fn find_project_contracts( +pub fn find_project_contracts( mut db: &dyn SemanticGroup, ui: Ui, unit: &CairoCompilationUnit, diff --git a/scarb/src/compiler/compilers/test.rs b/scarb/src/compiler/compilers/test.rs index 30c5a5e98..fae25caef 100644 --- a/scarb/src/compiler/compilers/test.rs +++ b/scarb/src/compiler/compilers/test.rs @@ -3,16 +3,18 @@ use cairo_lang_compiler::db::RootDatabase; use cairo_lang_filesystem::db::FilesGroup; use cairo_lang_filesystem::ids::{CrateId, CrateLongId}; use cairo_lang_sierra::program::VersionedProgram; +use cairo_lang_starknet::contract::ContractDeclaration; use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass; use cairo_lang_test_plugin::{compile_test_prepared_db, TestsCompilationConfig}; +use cairo_lang_utils::UpcastMut; use itertools::Itertools; use smol_str::ToSmolStr; use tracing::trace_span; use crate::compiler::compilers::starknet_contract::Props as StarknetContractProps; use crate::compiler::compilers::{ - ensure_gas_enabled, get_compiled_contracts, ArtifactsWriter, CompiledContracts, - ContractSelector, + ensure_gas_enabled, find_project_contracts, get_compiled_contracts, ArtifactsWriter, + CompiledContracts, ContractSelector, }; use crate::compiler::helpers::{build_compiler_config, collect_main_crate_ids, write_json}; use crate::compiler::{CairoCompilationUnit, CompilationUnitAttributes, Compiler}; @@ -45,6 +47,18 @@ impl Compiler for TestCompiler { && plugin.package.id.source_id == SourceId::for_std() }); + let contracts = if starknet { + find_project_contracts( + db.upcast_mut(), + ws.config().ui(), + &unit, + test_crate_ids.clone(), + build_external_contracts.clone(), + )? + } else { + Vec::new() + }; + let diagnostics_reporter = build_compiler_config(db, &unit, &test_crate_ids, ws).diagnostics_reporter; @@ -58,14 +72,11 @@ impl Compiler for TestCompiler { add_statements_code_locations: unit .compiler_config .unstable_add_statements_code_locations_debug_info, + contract_crate_ids: starknet.then_some(all_crate_ids), + executable_crate_ids: None, + contract_declarations: starknet.then_some(contracts.clone()), }; - compile_test_prepared_db( - db, - config, - all_crate_ids.clone(), - test_crate_ids.clone(), - diagnostics_reporter, - )? + compile_test_prepared_db(db, config, test_crate_ids.clone(), diagnostics_reporter)? }; { @@ -90,6 +101,7 @@ impl Compiler for TestCompiler { // `build-external-contracts`. It will not collect contracts from all dependencies. compile_contracts( test_crate_ids, + contracts, build_external_contracts, target_dir, unit, @@ -104,6 +116,7 @@ impl Compiler for TestCompiler { fn compile_contracts( main_crate_ids: Vec, + contracts: Vec, build_external_contracts: Option>, target_dir: Filesystem, unit: CairoCompilationUnit, @@ -121,14 +134,7 @@ fn compile_contracts( contract_paths, contracts, classes, - } = get_compiled_contracts( - main_crate_ids, - props.build_external_contracts.clone(), - compiler_config, - &unit, - db, - ws, - )?; + } = get_compiled_contracts(contracts, compiler_config, db)?; let writer = ArtifactsWriter::new(target_name.clone(), target_dir, props) .with_extension_prefix("test".to_string()); let casm_classes: Vec> = classes.iter().map(|_| None).collect();