diff --git a/Cargo.lock b/Cargo.lock index 4cb330389..61f12117d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -553,8 +553,8 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-utils", "indoc", @@ -566,8 +566,8 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-lang-defs", @@ -588,16 +588,16 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -612,8 +612,8 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -623,8 +623,8 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-utils", "good_lp", @@ -632,8 +632,8 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -645,8 +645,8 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -665,8 +665,8 @@ dependencies = [ [[package]] name = "cairo-lang-language-server" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -695,8 +695,8 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -741,8 +741,8 @@ version = "1.0.0" [[package]] name = "cairo-lang-parser" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -760,8 +760,8 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -778,8 +778,8 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "quote", @@ -788,8 +788,8 @@ dependencies = [ [[package]] name = "cairo-lang-project" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -801,8 +801,8 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "ark-ff", "ark-secp256k1", @@ -831,8 +831,8 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -855,8 +855,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-felt", @@ -880,8 +880,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -894,8 +894,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -908,8 +908,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -930,8 +930,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "assert_matches", "cairo-felt", @@ -950,8 +950,8 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -959,8 +959,8 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-felt", @@ -989,8 +989,8 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-felt", "cairo-lang-casm", @@ -1013,8 +1013,8 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1028,8 +1028,8 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "genco", "xshell", @@ -1037,8 +1037,8 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-felt", @@ -1064,8 +1064,8 @@ dependencies = [ [[package]] name = "cairo-lang-test-runner" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "anyhow", "cairo-felt", @@ -1086,8 +1086,8 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.6.1" -source = "git+https://github.com/starkware-libs/cairo?rev=b22e43ffecf884877ed3a65d3077c0b8af586d6c#b22e43ffecf884877ed3a65d3077c0b8af586d6c" +version = "2.6.0" +source = "git+https://github.com/starkware-libs/cairo?rev=8e47925be7c91e7500bc5827c9e8f7f401985f3e#8e47925be7c91e7500bc5827c9e8f7f401985f3e" dependencies = [ "env_logger", "hashbrown 0.14.3", @@ -4464,7 +4464,7 @@ dependencies = [ [[package]] name = "scarb" -version = "2.6.1" +version = "2.6.0" dependencies = [ "anyhow", "assert_fs", @@ -4550,7 +4550,7 @@ dependencies = [ [[package]] name = "scarb-build-metadata" -version = "2.6.1" +version = "2.6.0" dependencies = [ "cargo_metadata", "semver", @@ -4558,14 +4558,14 @@ dependencies = [ [[package]] name = "scarb-cairo-language-server" -version = "2.6.1" +version = "2.6.0" dependencies = [ "cairo-lang-language-server", ] [[package]] name = "scarb-cairo-run" -version = "2.6.1" +version = "2.6.0" dependencies = [ "anyhow", "assert_fs", @@ -4587,7 +4587,7 @@ dependencies = [ [[package]] name = "scarb-cairo-test" -version = "2.6.1" +version = "2.6.0" dependencies = [ "anyhow", "cairo-lang-test-plugin", @@ -4630,7 +4630,7 @@ dependencies = [ [[package]] name = "scarb-snforge-test-collector" -version = "2.6.1" +version = "2.6.0" dependencies = [ "anyhow", "assert_fs", diff --git a/Cargo.toml b/Cargo.toml index d4449c61e..7d11f957b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ "resolver" = "2" [workspace.package] -version = "2.6.1" +version = "2.6.0" edition = "2021" authors = ["Software Mansion "] @@ -35,28 +35,28 @@ assert_fs = "1" async-trait = "0.1" axum = { version = "0.6", features = ["http2"] } cairo-felt = "0.9.1" -cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c" } -cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "b22e43ffecf884877ed3a65d3077c0b8af586d6c", features = ["env_logger"] } +cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e" } +cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "8e47925be7c91e7500bc5827c9e8f7f401985f3e", 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/src/deserialization.rs b/extensions/scarb-cairo-run/src/deserialization.rs index 61a57d796..71a7a55ea 100644 --- a/extensions/scarb-cairo-run/src/deserialization.rs +++ b/extensions/scarb-cairo-run/src/deserialization.rs @@ -43,14 +43,15 @@ impl Args { impl Clone for Args { fn clone(&self) -> Self { - Self(self.0.iter().map(clone_arg).collect()) - } -} - -fn clone_arg(arg: &Arg) -> Arg { - match arg { - Arg::Value(value) => Arg::Value(value.to_owned()), - Arg::Array(args) => Arg::Array(args.iter().map(clone_arg).collect()), + Self( + self.0 + .iter() + .map(|arg| match arg { + Arg::Value(value) => Arg::Value(value.to_owned()), + Arg::Array(array) => Arg::Array(array.iter().map(ToOwned::to_owned).collect()), + }) + .collect(), + ) } } @@ -82,7 +83,7 @@ impl FromStr for Args { } impl Args { - fn visit_seq_helper(seq: &[Value]) -> Result, ArgsError> { + fn visit_seq_helper(seq: &[Value]) -> Result { let iterator = seq.iter(); let mut args = Vec::new(); @@ -97,13 +98,27 @@ impl Args { args.push(Arg::Value(Felt252::from_bytes_be(&n.to_bytes_be()))); } Value::Array(arr) => { - args.push(Arg::Array(Self::visit_seq_helper(arr)?)); + let mut inner_args = Vec::new(); + for a in arr { + match a { + Value::Number(n) => { + let n = n.as_u64().ok_or(ArgsError::NumberOutOfRange)?; + inner_args.push(Felt252::from(n)); + } + Value::String(n) => { + let n = num_bigint::BigUint::from_str(n)?; + inner_args.push(Felt252::from_bytes_be(&n.to_bytes_be())); + } + _ => (), + } + } + args.push(Arg::Array(inner_args)); } _ => (), } } - Ok(args) + Ok(Self::new(args)) } } @@ -126,9 +141,7 @@ impl<'de> Visitor<'de> for Args { } } - Self::visit_seq_helper(&args) - .map(Self::new) - .map_err(|e| serde::de::Error::custom(e.to_string())) + Self::visit_seq_helper(&args).map_err(|e| serde::de::Error::custom(e.to_string())) } } diff --git a/extensions/scarb-cairo-run/tests/arguments.rs b/extensions/scarb-cairo-run/tests/arguments.rs index b7f60ec2e..b8d229cf2 100644 --- a/extensions/scarb-cairo-run/tests/arguments.rs +++ b/extensions/scarb-cairo-run/tests/arguments.rs @@ -258,35 +258,6 @@ fn invalid_struct_deserialization() { "#}); } -#[test] -fn can_accept_nested_array() { - let t = TempDir::new().unwrap(); - ProjectBuilder::start() - .name("hello") - .version("0.1.0") - .lib_cairo(indoc! {r#" - fn main(a: felt252, b: felt252, n: Array>) { - println!("[{}, {}, {:?}]", a, b, n); - } - "#}) - .build(&t); - - Scarb::quick_snapbox() - .arg("cairo-run") - .arg("--") - .arg(r#"[0, 1, [[17], [1, 15, 3], [42]]]"#) - .current_dir(&t) - .assert() - .success() - .stdout_matches(indoc! {r#" - [..] Compiling hello v0.1.0 ([..]Scarb.toml) - [..] Finished release target(s) in [..] - [..] Running hello - [..][0, 1, [[17], [1, 15, 3], [42]]] - [..]Run completed successfully, returning [] - "#}); -} - #[test] fn cannot_set_gas_limit_for_package_with_disabled_gas_calculation() { let t = TempDir::new().unwrap();