Skip to content

Commit 0f006ce

Browse files
authored
Update cairo after 2.10.0 merge (#1995)
- **Remove add-redeposit-gas flag** - **Update Cairo after 2.10.0 merge**
1 parent 534075e commit 0f006ce

File tree

11 files changed

+229
-370
lines changed

11 files changed

+229
-370
lines changed

Cargo.lock

+174-172
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+36-36
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ members = [
2525
"resolver" = "2"
2626

2727
[workspace.package]
28-
version = "2.9.3"
28+
version = "2.10.0"
2929
edition = "2021"
3030

3131
authors = ["Software Mansion <[email protected]>"]
@@ -167,41 +167,41 @@ zstd = "0.13"
167167
# on some of them directly.
168168
# This ensures no duplicate instances of Cairo crates are pulled in by mistake.
169169
[patch.crates-io]
170-
cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
171-
cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
172-
cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
173-
cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
174-
cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
175-
cairo-lang-doc = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
176-
cairo-lang-eq-solver = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
177-
cairo-lang-executable = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
178-
cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
179-
cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
180-
cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
181-
cairo-lang-parser = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
182-
cairo-lang-plugins = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
183-
cairo-lang-proc-macros = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
184-
cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
185-
cairo-lang-runnable-utils = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
186-
cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
187-
cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
188-
cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
189-
cairo-lang-sierra-ap-change = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
190-
cairo-lang-sierra-gas = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
191-
cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
192-
cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
193-
cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
194-
cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
195-
cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
196-
cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
197-
cairo-lang-syntax-codegen = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
198-
cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
199-
cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
200-
cairo-lang-test-utils = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
201-
cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "9079dcaac9e7de1198acdfc34dbbdd31a1b4797a" }
202-
cairo-language-server = { git = "https://github.com/software-mansion/cairols", rev = "7f073fbe80d9501fce27af60b8a3fd2878f3a8a2" }
203-
cairo-lint-core = { git = "https://github.com/software-mansion/cairo-lint", rev = "f11992fba01ffc29ec656ae57b1c5edd98a74923" }
204-
stwo_cairo_prover = { git = "https://github.com/starkware-libs/stwo-cairo", rev = "5684db96bb70deaa5021f97579aa4ce6c52d7b34" }
170+
cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
171+
cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
172+
cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
173+
cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
174+
cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
175+
cairo-lang-doc = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
176+
cairo-lang-eq-solver = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
177+
cairo-lang-executable = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
178+
cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
179+
cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
180+
cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
181+
cairo-lang-parser = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
182+
cairo-lang-plugins = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
183+
cairo-lang-proc-macros = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
184+
cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
185+
cairo-lang-runnable-utils = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
186+
cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
187+
cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
188+
cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
189+
cairo-lang-sierra-ap-change = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
190+
cairo-lang-sierra-gas = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
191+
cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
192+
cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
193+
cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
194+
cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
195+
cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
196+
cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
197+
cairo-lang-syntax-codegen = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
198+
cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
199+
cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
200+
cairo-lang-test-utils = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
201+
cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "331ffedd49b24b81feb64a871778251d5a473446" }
202+
cairo-language-server = { git = "https://github.com/software-mansion/cairols", rev = "d42065d551658a77489f2e336b45e40102d4c15e" }
203+
cairo-lint-core = { git = "https://github.com/software-mansion/cairo-lint", rev = "3ac5b157a8ba333ad3c196044020d6bfd4a74ecf" }
204+
stwo_cairo_prover = { git = "https://github.com/starkware-libs/stwo-cairo", rev = "5ac2490aa48cc1fc6a97fcd3bbaa98600e79c4c3" }
205205

206206
[profile.release]
207207
lto = true

extensions/scarb-cairo-run/tests/examples.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn can_limit_gas() {
9999
Finished `dev` profile target(s) in [..]
100100
Running hello_world
101101
Run completed successfully, returning [987]
102-
Remaining gas: 59760
102+
Remaining gas: 57270
103103
"#});
104104
}
105105

extensions/scarb-cairo-test/tests/build.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -237,12 +237,12 @@ fn integration_tests() {
237237
[..]Finished `dev` profile target(s) in [..]
238238
testing hello ...
239239
running 2 tests
240-
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740)
241-
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740)
240+
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 43130)
241+
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 43130)
242242
test result: ok. 2 passed; 0 failed; 0 ignored; 0 filtered out;
243243
244244
running 1 test
245-
test hello::tests::it_works ... ok (gas usage est.: 40740)
245+
test hello::tests::it_works ... ok (gas usage est.: 43130)
246246
test result: ok. 1 passed; 0 failed; 0 ignored; 0 filtered out;
247247
248248
"#});
@@ -336,7 +336,7 @@ fn can_choose_test_kind_to_run() {
336336
[..]Finished `dev` profile target(s) in [..]
337337
testing hello ...
338338
running 1 test
339-
test hello::tests::it_works ... ok (gas usage est.: 40740)
339+
test hello::tests::it_works ... ok (gas usage est.: 43130)
340340
test result: ok. 1 passed; 0 failed; 0 ignored; 0 filtered out;
341341
342342
"#});
@@ -352,8 +352,8 @@ fn can_choose_test_kind_to_run() {
352352
[..]Finished `dev` profile target(s) in [..]
353353
testing hello ...
354354
running 2 tests
355-
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740)
356-
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 40740)
355+
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 43130)
356+
test hello_integrationtest::[..]::tests::it_works ... ok (gas usage est.: 43130)
357357
test result: ok. 2 passed; 0 failed; 0 ignored; 0 filtered out;
358358
359359
"#});

scarb/src/compiler/db.rs

-3
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ pub(crate) fn build_scarb_root_database(
3939
if !unit.compiler_config.enable_gas {
4040
b.skip_auto_withdraw_gas();
4141
}
42-
if unit.compiler_config.add_redeposit_gas {
43-
b.with_add_redeposit_gas();
44-
}
4542
let mut db = b.build()?;
4643
inject_virtual_wrapper_lib(&mut db, unit)?;
4744
Ok(ScarbDatabase {

scarb/src/core/manifest/compiler_config.rs

-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ pub struct ManifestCompilerConfig {
2020
pub allow_warnings: bool,
2121
/// Enable auto gas withdrawal and gas usage check.
2222
pub enable_gas: bool,
23-
/// Add a call to the redeposits_gas libfunc in a bunch of places.
24-
pub add_redeposit_gas: bool,
2523
/// Add a mapping between sierra statement indexes and fully qualified paths of cairo functions
2624
/// to debug info. A statement index maps to a vector consisting of a function which caused the
2725
/// statement to be generated and all functions that were inlined or generated along the way.
@@ -54,7 +52,6 @@ impl DefaultForProfile for ManifestCompilerConfig {
5452
sierra_replace_ids: profile.is_dev(),
5553
allow_warnings: true,
5654
enable_gas: true,
57-
add_redeposit_gas: false,
5855
unstable_add_statements_functions_debug_info: false,
5956
unstable_add_statements_code_locations_debug_info: false,
6057
inlining_strategy: InliningStrategy::default(),
@@ -68,7 +65,6 @@ impl From<ManifestCompilerConfig> for TomlCairo {
6865
sierra_replace_ids: Some(config.sierra_replace_ids),
6966
allow_warnings: Some(config.allow_warnings),
7067
enable_gas: Some(config.enable_gas),
71-
add_redeposit_gas: Some(config.add_redeposit_gas),
7268
unstable_add_statements_functions_debug_info: Some(
7369
config.unstable_add_statements_functions_debug_info,
7470
),

scarb/src/core/manifest/toml_manifest.rs

-5
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ pub struct TomlCairo {
333333
pub allow_warnings: Option<bool>,
334334
/// Enable auto gas withdrawal and gas usage check.
335335
pub enable_gas: Option<bool>,
336-
/// Add a call to the redeposits_gas libfunc in a bunch of places.
337-
pub add_redeposit_gas: Option<bool>,
338336
/// Add a mapping between sierra statement indexes and fully qualified paths of cairo functions
339337
/// to debug info. A statement index maps to a vector consisting of a function which caused the
340338
/// statement to be generated and all functions that were inlined or generated along the way.
@@ -921,9 +919,6 @@ impl TomlManifest {
921919
if let Some(enable_gas) = cairo.enable_gas {
922920
compiler_config.enable_gas = enable_gas;
923921
}
924-
if let Some(add_redeposit_gas) = cairo.add_redeposit_gas {
925-
compiler_config.add_redeposit_gas = add_redeposit_gas;
926-
}
927922
if let Some(unstable_add_statements_functions_debug_info) =
928923
cairo.unstable_add_statements_functions_debug_info
929924
{

scarb/tests/build.rs

-34
Original file line numberDiff line numberDiff line change
@@ -1608,37 +1608,3 @@ fn can_import_from_self_by_name() {
16081608
.assert()
16091609
.success();
16101610
}
1611-
1612-
#[test]
1613-
fn can_build_with_add_redeposit_gas() {
1614-
let t = TempDir::new().unwrap();
1615-
ProjectBuilder::start()
1616-
.name("hello")
1617-
.lib_cairo(indoc! {r#"
1618-
fn main() -> u32 {
1619-
fib(16)
1620-
}
1621-
1622-
fn fib(mut n: u32) -> u32 {
1623-
let mut a: u32 = 0;
1624-
let mut b: u32 = 1;
1625-
while n != 0 {
1626-
n = n - 1;
1627-
let temp = b;
1628-
b = a + b;
1629-
a = temp;
1630-
};
1631-
a
1632-
}
1633-
"#})
1634-
.manifest_extra(indoc! {r#"
1635-
[cairo]
1636-
add-redeposit-gas = true
1637-
"#})
1638-
.build(&t);
1639-
Scarb::quick_snapbox()
1640-
.arg("build")
1641-
.current_dir(&t)
1642-
.assert()
1643-
.success();
1644-
}

scarb/tests/build_starknet_contract_allowed_libfuncs.rs

+12-37
Original file line numberDiff line numberDiff line change
@@ -26,47 +26,20 @@ const TESTING_LIST: &str = indoc! {r#"
2626
"#};
2727

2828
#[test]
29-
fn default_behaviour() {
29+
fn check_true() {
3030
let t = assert_fs::TempDir::new().unwrap();
31-
ProjectBuilder::start()
32-
.name("hello")
33-
.version("0.1.0")
34-
.manifest_extra(indoc! {r#"
35-
[[target.starknet-contract]]
36-
"#})
37-
.dep_starknet()
38-
.lib_cairo(EXPERIMENTAL_LIBFUNC)
39-
.build(&t);
40-
41-
Scarb::quick_snapbox()
42-
// NOTE: we cannot use `check` here, because without full compilation
43-
// we cannot predict what libfuncs would be generated
44-
.arg("build")
45-
.current_dir(&t)
46-
.assert()
47-
.success()
48-
.stdout_matches(indoc! {r#"
49-
[..] Compiling hello v0.1.0 ([..])
50-
warn: libfunc `redeposit_gas` is not allowed in the libfuncs list `Default libfunc list`
51-
--> contract: ExperimentalLibfunc
52-
help: try compiling with the `experimental` list
53-
--> Scarb.toml
54-
[[target.starknet-contract]]
55-
allowed-libfuncs-list.name = "experimental"
5631

57-
[..] Finished `dev` profile target(s) in [..]
58-
"#});
59-
}
32+
t.child("testing_list.json")
33+
.write_str(TESTING_LIST)
34+
.unwrap();
6035

61-
#[test]
62-
fn check_true() {
63-
let t = assert_fs::TempDir::new().unwrap();
6436
ProjectBuilder::start()
6537
.name("hello")
6638
.version("0.1.0")
6739
.manifest_extra(indoc! {r#"
6840
[[target.starknet-contract]]
6941
allowed-libfuncs = true
42+
allowed-libfuncs-list.path = "testing_list.json"
7043
"#})
7144
.dep_starknet()
7245
.lib_cairo(EXPERIMENTAL_LIBFUNC)
@@ -79,12 +52,8 @@ fn check_true() {
7952
.success()
8053
.stdout_matches(indoc! {r#"
8154
[..] Compiling hello v0.1.0 ([..])
82-
warn: libfunc `redeposit_gas` is not allowed in the libfuncs list `Default libfunc list`
55+
warn: libfunc `revoke_ap_tracking` is not allowed in the libfuncs list `[..]testing_list.json`
8356
--> contract: ExperimentalLibfunc
84-
help: try compiling with the `experimental` list
85-
--> Scarb.toml
86-
[[target.starknet-contract]]
87-
allowed-libfuncs-list.name = "experimental"
8857
8958
[..] Finished `dev` profile target(s) in [..]
9059
"#});
@@ -93,12 +62,18 @@ fn check_true() {
9362
#[test]
9463
fn check_false() {
9564
let t = assert_fs::TempDir::new().unwrap();
65+
66+
t.child("testing_list.json")
67+
.write_str(TESTING_LIST)
68+
.unwrap();
69+
9670
ProjectBuilder::start()
9771
.name("hello")
9872
.version("0.1.0")
9973
.manifest_extra(indoc! {r#"
10074
[[target.starknet-contract]]
10175
allowed-libfuncs = false
76+
allowed-libfuncs-list.path = "testing_list.json"
10277
"#})
10378
.dep_starknet()
10479
.lib_cairo(EXPERIMENTAL_LIBFUNC)

scarb/tests/metadata.rs

-58
Original file line numberDiff line numberDiff line change
@@ -1388,64 +1388,6 @@ fn includes_experimental_features() {
13881388
.contains(&String::from("associated_item_constraints")));
13891389
}
13901390

1391-
#[test]
1392-
fn add_redeposit_gas_disabled_by_default() {
1393-
let t = assert_fs::TempDir::new().unwrap();
1394-
ProjectBuilder::start()
1395-
.name("hello")
1396-
.version("0.1.0")
1397-
.build(&t);
1398-
1399-
let metadata = Scarb::quick_snapbox()
1400-
.arg("--json")
1401-
.arg("metadata")
1402-
.arg("--format-version")
1403-
.arg("1")
1404-
.current_dir(&t)
1405-
.stdout_json::<Metadata>();
1406-
1407-
let add_redeposit_gas = metadata
1408-
.compilation_units
1409-
.iter()
1410-
.find(|cu| cu.target.name.clone() == "hello")
1411-
.map(|cu| cu.compiler_config.get("add_redeposit_gas").unwrap())
1412-
.unwrap()
1413-
.as_bool()
1414-
.unwrap();
1415-
assert!(!add_redeposit_gas);
1416-
}
1417-
1418-
#[test]
1419-
fn can_enable_add_redeposit_gas() {
1420-
let t = assert_fs::TempDir::new().unwrap();
1421-
ProjectBuilder::start()
1422-
.name("hello")
1423-
.version("0.1.0")
1424-
.manifest_package_extra(indoc! {r#"
1425-
[cairo]
1426-
add-redeposit-gas = true
1427-
"#})
1428-
.build(&t);
1429-
1430-
let metadata = Scarb::quick_snapbox()
1431-
.arg("--json")
1432-
.arg("metadata")
1433-
.arg("--format-version")
1434-
.arg("1")
1435-
.current_dir(&t)
1436-
.stdout_json::<Metadata>();
1437-
1438-
let add_redeposit_gas = metadata
1439-
.compilation_units
1440-
.iter()
1441-
.find(|cu| cu.target.name.clone() == "hello")
1442-
.map(|cu| cu.compiler_config.get("add_redeposit_gas").unwrap())
1443-
.unwrap()
1444-
.as_bool()
1445-
.unwrap();
1446-
assert!(add_redeposit_gas);
1447-
}
1448-
14491391
#[test]
14501392
fn prebuilt_plugins_disallowed_by_default() {
14511393
let t = assert_fs::TempDir::new().unwrap();

0 commit comments

Comments
 (0)