diff --git a/Cargo.lock b/Cargo.lock index 72fa610d8..826192d9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -568,7 +568,7 @@ dependencies = [ [[package]] name = "cairo-lang-casm" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-utils", "indoc", @@ -581,7 +581,7 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-defs", @@ -606,7 +606,7 @@ dependencies = [ [[package]] name = "cairo-lang-debug" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-utils", ] @@ -614,7 +614,7 @@ dependencies = [ [[package]] name = "cairo-lang-defs" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -630,7 +630,7 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -641,7 +641,7 @@ dependencies = [ [[package]] name = "cairo-lang-doc" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-defs", "cairo-lang-filesystem", @@ -656,7 +656,7 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-utils", "good_lp", @@ -665,7 +665,7 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -674,12 +674,13 @@ dependencies = [ "semver", "serde", "smol_str", + "toml", ] [[package]] name = "cairo-lang-formatter" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -699,7 +700,7 @@ dependencies = [ [[package]] name = "cairo-lang-language-server" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -735,7 +736,7 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -799,7 +800,7 @@ checksum = "c49906d6b1c215e5814be7c5c65ecf2328898b335bee8c2409ec07cfb5530daf" [[package]] name = "cairo-lang-parser" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -818,7 +819,7 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -836,7 +837,7 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "quote", @@ -846,7 +847,7 @@ dependencies = [ [[package]] name = "cairo-lang-project" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -859,7 +860,7 @@ dependencies = [ [[package]] name = "cairo-lang-runner" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "ark-ff", "ark-secp256k1", @@ -889,7 +890,7 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -914,7 +915,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-utils", @@ -940,7 +941,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -955,7 +956,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -970,7 +971,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -993,7 +994,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -1013,7 +1014,7 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -1022,7 +1023,7 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1051,7 +1052,7 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -1073,7 +1074,7 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1088,7 +1089,7 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "genco", "xshell", @@ -1097,7 +1098,7 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1123,7 +1124,7 @@ dependencies = [ [[package]] name = "cairo-lang-test-runner" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1145,7 +1146,7 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1157,7 +1158,7 @@ dependencies = [ [[package]] name = "cairo-lang-utils" version = "2.8.2" -source = "git+https://github.com/starkware-libs/cairo?rev=f909ab830b16ce02cfdcf2d2a350b284b101166e#f909ab830b16ce02cfdcf2d2a350b284b101166e" +source = "git+https://github.com/starkware-libs/cairo?rev=e4136a412b03aff3ba1dec3eb8d8d22356cd67ae#e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" dependencies = [ "env_logger", "hashbrown 0.14.5", diff --git a/Cargo.toml b/Cargo.toml index 3b628df4f..630de62ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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 = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-doc = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-parser = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e" } -cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "f909ab830b16ce02cfdcf2d2a350b284b101166e", features = ["env_logger"] } +cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-doc = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-parser = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae" } +cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "e4136a412b03aff3ba1dec3eb8d8d22356cd67ae", features = ["env_logger"] } camino = { version = "1", features = ["serde1"] } cargo_metadata = ">=0.18" clap = { version = "4", features = ["derive", "env", "string"] } diff --git a/extensions/scarb-doc/src/metadata/compilation.rs b/extensions/scarb-doc/src/metadata/compilation.rs index 7223c6490..74570dc45 100644 --- a/extensions/scarb-doc/src/metadata/compilation.rs +++ b/extensions/scarb-doc/src/metadata/compilation.rs @@ -2,11 +2,14 @@ use scarb_metadata::{ CompilationUnitComponentMetadata, CompilationUnitMetadata, Metadata, PackageId, PackageMetadata, }; use smol_str::{SmolStr, ToSmolStr}; +use std::collections::BTreeMap; use std::path::PathBuf; use cairo_lang_compiler::project::{AllCratesConfig, ProjectConfig, ProjectConfigContent}; use cairo_lang_filesystem::cfg::{Cfg, CfgSet}; -use cairo_lang_filesystem::db::{CrateSettings, Edition, ExperimentalFeaturesConfig}; +use cairo_lang_filesystem::db::{ + CrateSettings, DependencySettings, Edition, ExperimentalFeaturesConfig, +}; use cairo_lang_filesystem::ids::Directory; use cairo_lang_utils::ordered_hash_map::OrderedHashMap; use itertools::Itertools; @@ -97,6 +100,8 @@ fn get_crates_config( ( SmolStr::from(&component.name), get_crate_settings_for_package( + &metadata.packages, + &compilation_unit_metadata.components, pkg, component.cfg.as_ref().map(|cfg_vec| build_cfg_set(cfg_vec)), ), @@ -111,6 +116,8 @@ fn get_crates_config( } fn get_crate_settings_for_package( + packages: &[PackageMetadata], + compilation_unit_metadata_components: &[CompilationUnitComponentMetadata], package: &PackageMetadata, cfg_set: Option, ) -> CrateSettings { @@ -131,10 +138,39 @@ fn get_crate_settings_for_package( .contains(&String::from("coupons")), }; + let mut dependencies: BTreeMap = package + .dependencies + .iter() + .filter_map(|dependency| { + compilation_unit_metadata_components + .iter() + .find(|compilation_unit_metadata_component| { + compilation_unit_metadata_component.name == dependency.name + }) + .map(|compilation_unit_metadata_component| { + let version = packages + .iter() + .find(|package| package.name == compilation_unit_metadata_component.name) + .map(|package| package.version.clone()); + + (dependency.name.clone(), DependencySettings { version }) + }) + }) + .collect(); + + // Adds itself to dependencies + dependencies.insert( + package.name.clone(), + DependencySettings { + version: Some(package.version.clone()), + }, + ); + CrateSettings { edition, cfg_set, experimental_features, + dependencies, version: Some(package.version.clone()), } } diff --git a/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-CircleShape.md b/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-CircleShape.md index 5e0a80a28..afc651ed4 100644 --- a/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-CircleShape.md +++ b/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-CircleShape.md @@ -14,7 +14,7 @@ impl CircleShape of Shape Shape constant -Fully qualified path: `hello_world::CircleShape::SHAPE_CONST` +Fully qualified path: `hello_world::hello_world::CircleShape::SHAPE_CONST` ```rust const SHAPE_CONST: felt252 = 'xyz'; @@ -40,7 +40,7 @@ fn area(self: Circle) -> u32 Type alias for a pair of circles -Fully qualified path: `hello_world::CircleShape::ShapePair` +Fully qualified path: `hello_world::hello_world::CircleShape::ShapePair` ```rust type ShapePair = (Circle, Circle); diff --git a/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-Shape.md b/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-Shape.md index c0b8a4fec..9680c4ce9 100644 --- a/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-Shape.md +++ b/extensions/scarb-doc/tests/data/hello_world_no_features/src/hello_world-Shape.md @@ -14,7 +14,7 @@ trait Shape Constant for the shape type -Fully qualified path: `hello_world::Shape::SHAPE_CONST` +Fully qualified path: `hello_world::hello_world::Shape::SHAPE_CONST` ```rust const SHAPE_CONST: felt252; @@ -27,7 +27,7 @@ const SHAPE_CONST: felt252; Calculate the area of the shape -Fully qualified path: `Shape::area` +Fully qualified path: `hello_world::Shape::area` ```rust fn area(self: T) -> u32 @@ -40,7 +40,7 @@ fn area(self: T) -> u32 Type alias for a pair of shapes -Fully qualified path: `hello_world::Shape::ShapePair` +Fully qualified path: `hello_world::hello_world::Shape::ShapePair` ```rust type ShapePair; diff --git a/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-CircleShape.md b/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-CircleShape.md index 5e0a80a28..afc651ed4 100644 --- a/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-CircleShape.md +++ b/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-CircleShape.md @@ -14,7 +14,7 @@ impl CircleShape of Shape Shape constant -Fully qualified path: `hello_world::CircleShape::SHAPE_CONST` +Fully qualified path: `hello_world::hello_world::CircleShape::SHAPE_CONST` ```rust const SHAPE_CONST: felt252 = 'xyz'; @@ -40,7 +40,7 @@ fn area(self: Circle) -> u32 Type alias for a pair of circles -Fully qualified path: `hello_world::CircleShape::ShapePair` +Fully qualified path: `hello_world::hello_world::CircleShape::ShapePair` ```rust type ShapePair = (Circle, Circle); diff --git a/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-Shape.md b/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-Shape.md index c0b8a4fec..9680c4ce9 100644 --- a/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-Shape.md +++ b/extensions/scarb-doc/tests/data/hello_world_with_features/src/hello_world-Shape.md @@ -14,7 +14,7 @@ trait Shape Constant for the shape type -Fully qualified path: `hello_world::Shape::SHAPE_CONST` +Fully qualified path: `hello_world::hello_world::Shape::SHAPE_CONST` ```rust const SHAPE_CONST: felt252; @@ -27,7 +27,7 @@ const SHAPE_CONST: felt252; Calculate the area of the shape -Fully qualified path: `Shape::area` +Fully qualified path: `hello_world::Shape::area` ```rust fn area(self: T) -> u32 @@ -40,7 +40,7 @@ fn area(self: T) -> u32 Type alias for a pair of shapes -Fully qualified path: `hello_world::Shape::ShapePair` +Fully qualified path: `hello_world::hello_world::Shape::ShapePair` ```rust type ShapePair; diff --git a/extensions/scarb-doc/tests/data/json_output_test_data.json b/extensions/scarb-doc/tests/data/json_output_test_data.json index 5a5e87c34..7e574ff58 100644 --- a/extensions/scarb-doc/tests/data/json_output_test_data.json +++ b/extensions/scarb-doc/tests/data/json_output_test_data.json @@ -143,7 +143,7 @@ "name": "SHAPE_CONST", "doc": "Constant for the shape type", "signature": "const SHAPE_CONST: felt252;", - "full_path": "hello_world::Shape::SHAPE_CONST" + "full_path": "hello_world::hello_world::Shape::SHAPE_CONST" } } ], @@ -153,7 +153,7 @@ "name": "ShapePair", "doc": "Type alias for a pair of shapes", "signature": "type ShapePair;", - "full_path": "hello_world::Shape::ShapePair" + "full_path": "hello_world::hello_world::Shape::ShapePair" } } ], @@ -163,7 +163,7 @@ "name": "area", "doc": "Calculate the area of the shape", "signature": "fn area(self: T) -> u32", - "full_path": "Shape::area" + "full_path": "hello_world::Shape::area" } } ], @@ -183,7 +183,7 @@ "name": "ShapePair", "doc": "Type alias for a pair of circles", "signature": "type ShapePair = (Circle, Circle);", - "full_path": "hello_world::CircleShape::ShapePair" + "full_path": "hello_world::hello_world::CircleShape::ShapePair" } } ], @@ -193,7 +193,7 @@ "name": "SHAPE_CONST", "doc": "Shape constant", "signature": "const SHAPE_CONST: felt252 = 'xyz';", - "full_path": "hello_world::CircleShape::SHAPE_CONST" + "full_path": "hello_world::hello_world::CircleShape::SHAPE_CONST" } } ], diff --git a/extensions/scarb-snforge-test-collector/src/metadata.rs b/extensions/scarb-snforge-test-collector/src/metadata.rs index 2c6ad87f5..292274e5b 100644 --- a/extensions/scarb-snforge-test-collector/src/metadata.rs +++ b/extensions/scarb-snforge-test-collector/src/metadata.rs @@ -1,6 +1,8 @@ use anyhow::{anyhow, ensure, Context, Result}; use cairo_lang_filesystem::cfg::{Cfg, CfgSet}; -use cairo_lang_filesystem::db::{CrateSettings, Edition, ExperimentalFeaturesConfig}; +use cairo_lang_filesystem::db::{ + CrateSettings, DependencySettings, Edition, ExperimentalFeaturesConfig, +}; use cairo_lang_project::AllCratesConfig; use cairo_lang_utils::ordered_hash_map::OrderedHashMap; use camino::{Utf8Path, Utf8PathBuf}; @@ -10,6 +12,7 @@ use scarb_metadata::{ }; use serde_json::json; use smol_str::{SmolStr, ToSmolStr}; +use std::collections::BTreeMap; use std::path::PathBuf; pub fn compilation_unit_for_package<'a>( @@ -134,6 +137,8 @@ impl CompilationUnit<'_> { ( SmolStr::from(&component.name), get_crate_settings_for_package( + &self.metadata.packages, + &self.unit_metadata.components, pkg, component.cfg.as_ref().map(|cfg_vec| build_cfg_set(cfg_vec)), ), @@ -192,6 +197,8 @@ impl CompilationUnit<'_> { .expect("Main package not found in metadata"); get_crate_settings_for_package( + &self.metadata.packages, + &self.unit_metadata.components, package, self.main_package_metadata .cfg @@ -206,6 +213,8 @@ impl CompilationUnit<'_> { } fn get_crate_settings_for_package( + packages: &[PackageMetadata], + compilation_unit_metadata_components: &[CompilationUnitComponentMetadata], package: &PackageMetadata, cfg_set: Option, ) -> CrateSettings { @@ -226,10 +235,39 @@ fn get_crate_settings_for_package( .contains(&String::from("coupons")), }; + let mut dependencies: BTreeMap = package + .dependencies + .iter() + .filter_map(|dependency| { + compilation_unit_metadata_components + .iter() + .find(|compilation_unit_metadata_component| { + compilation_unit_metadata_component.name == dependency.name + }) + .map(|compilation_unit_metadata_component| { + let version = packages + .iter() + .find(|package| package.name == compilation_unit_metadata_component.name) + .map(|package| package.version.clone()); + + (dependency.name.clone(), DependencySettings { version }) + }) + }) + .collect(); + + // Adds itself to dependencies + dependencies.insert( + package.name.clone(), + DependencySettings { + version: Some(package.version.clone()), + }, + ); + CrateSettings { edition, cfg_set, experimental_features, + dependencies, version: Some(package.version.clone()), } } diff --git a/scarb/src/compiler/db.rs b/scarb/src/compiler/db.rs index 761e69d02..2adbabfc6 100644 --- a/scarb/src/compiler/db.rs +++ b/scarb/src/compiler/db.rs @@ -4,16 +4,19 @@ use cairo_lang_compiler::project::{AllCratesConfig, ProjectConfig, ProjectConfig use cairo_lang_defs::db::DefsGroup; use cairo_lang_defs::ids::ModuleId; use cairo_lang_defs::plugin::MacroPlugin; -use cairo_lang_filesystem::db::{AsFilesGroupMut, CrateSettings, FilesGroup, FilesGroupEx}; +use cairo_lang_filesystem::db::{ + AsFilesGroupMut, CrateSettings, DependencySettings, FilesGroup, FilesGroupEx, +}; use cairo_lang_filesystem::ids::{CrateLongId, Directory}; use cairo_lang_utils::ordered_hash_map::OrderedHashMap; use smol_str::SmolStr; +use std::collections::BTreeMap; use std::sync::Arc; use tracing::trace; use crate::compiler::plugin::proc_macro::{ProcMacroHost, ProcMacroHostPlugin}; use crate::compiler::{CairoCompilationUnit, CompilationUnitAttributes, CompilationUnitComponent}; -use crate::core::Workspace; +use crate::core::{ManifestDependency, Workspace}; use crate::DEFAULT_MODULE_MAIN_FILE; pub struct ScarbDatabase { @@ -134,12 +137,60 @@ fn build_project_config(unit: &CairoCompilationUnit) -> Result { .map(|component| { let experimental_features = component.package.manifest.experimental_features.clone(); let experimental_features = experimental_features.unwrap_or_default(); + // Those are direct dependencies of the component. + let dependencies_summary: Vec<&ManifestDependency> = component + .package + .manifest + .summary + .full_dependencies() + .collect(); + + // We iterate over all of the compilation unit components to get dependency's version. + let mut dependencies: BTreeMap = unit + .components + .iter() + .filter(|component_as_dependency| { + dependencies_summary.iter().any(|dependency_summary| { + dependency_summary.name == component_as_dependency.package.id.name + }) || + // This is a hacky way of accommodating integration test components, + // which need to depend on the tested package. + component_as_dependency + .package + .manifest + .targets + .iter() + .filter(|target| target.kind.is_test()) + .any(|target| { + target.group_id.clone().unwrap_or(target.name.clone()) + == component.package.id.name.to_smol_str() + }) + }) + .map(|compilation_unit_component| { + ( + compilation_unit_component.package.id.name.to_string(), + DependencySettings { + version: Some(compilation_unit_component.package.id.version.clone()), + }, + ) + }) + .collect(); + + // Adds itself to dependencies + dependencies.insert( + component.package.id.name.to_string(), + DependencySettings { + version: Some(component.package.id.version.clone()), + }, + ); + ( component.cairo_package_name(), CrateSettings { edition: component.package.manifest.edition, cfg_set: component.cfg_set.clone(), version: Some(component.package.id.version.clone()), + dependencies, // TODO (#1040): replace this with a macro experimental_features: cairo_lang_filesystem::db::ExperimentalFeaturesConfig { negative_impls: experimental_features diff --git a/scarb/tests/build_starknet_contract.rs b/scarb/tests/build_starknet_contract.rs index 04e700592..d2016b1f1 100644 --- a/scarb/tests/build_starknet_contract.rs +++ b/scarb/tests/build_starknet_contract.rs @@ -387,7 +387,7 @@ fn compile_starknet_contract_without_starknet_dep() { fn constructor(ref self: ContractState, value_: u128) { ^***********^ - error: Ambiguous method call. More than one applicable trait function with a suitable self type was found: StorageMapWriteAccess::write and StoragePointerWriteAccess::write. Consider adding type annotations or explicitly refer to the impl function. + error: Ambiguous method call. More than one applicable trait function with a suitable self type was found: core::starknet::storage::map::StorageMapWriteAccess::write and core::starknet::storage::StoragePointerWriteAccess::write. Consider adding type annotations or explicitly refer to the impl function. --> [..]src/lib.cairo:20:20 self.value.write(value_); ^***^ @@ -402,7 +402,7 @@ fn compile_starknet_contract_without_starknet_dep() { fn get(self: @ContractState) -> u128 { ^***********^ - error: Ambiguous method call. More than one applicable trait function with a suitable self type was found: StorageMapReadAccess::read and StoragePointerReadAccess::read. Consider adding type annotations or explicitly refer to the impl function. + error: Ambiguous method call. More than one applicable trait function with a suitable self type was found: core::starknet::storage::map::StorageMapReadAccess::read and core::starknet::storage::StoragePointerReadAccess::read. Consider adding type annotations or explicitly refer to the impl function. --> [..]src/lib.cairo:26:24 self.value.read() ^**^ @@ -412,7 +412,7 @@ fn compile_starknet_contract_without_starknet_dep() { fn increase(ref self: ContractState, a: u128) { ^***********^ - error: Ambiguous method call. More than one applicable trait function with a suitable self type was found: StorageMapWriteAccess::write and StoragePointerWriteAccess::write. Consider adding type annotations or explicitly refer to the impl function. + error: Ambiguous method call. More than one applicable trait function with a suitable self type was found: core::starknet::storage::map::StorageMapWriteAccess::write and core::starknet::storage::StoragePointerWriteAccess::write. Consider adding type annotations or explicitly refer to the impl function. --> [..]src/lib.cairo:29:24 self.value.write( self.value.read() + a ); ^***^