From 360ce99c6e77e4d5dd606f8a0f08ba11f254b65c Mon Sep 17 00:00:00 2001 From: xunilrj Date: Wed, 24 Apr 2024 21:44:40 +0100 Subject: [PATCH] multiple fixes for the new encoding --- sway-core/src/ir_generation/const_eval.rs | 10 +++- sway-core/src/language/ty/program.rs | 55 ++++++++++++------- .../ast_node/declaration/auto_impl.rs | 30 ++++------ .../semantic_analysis/cei_pattern_analysis.rs | 12 +++- sway-core/src/semantic_analysis/module.rs | 21 ++++--- sway-error/src/error.rs | 2 +- .../chained_if_let_missing_branch/src/main.sw | 5 -- .../configurables_are_not_const/Forc.lock | 9 ++- .../configurables_are_not_const/Forc.toml | 3 + .../const-instead-of-let/Forc.lock | 5 +- .../const-instead-of-let/Forc.toml | 1 + .../const-instead-of-let/test.toml | 2 +- .../contract_a/Forc.toml | 1 + .../contract_b/Forc.lock | 16 ++++-- .../contract_b/Forc.toml | 4 +- .../contract_c/Forc.lock | 9 ++- .../contract_c/Forc.toml | 2 + .../should_fail/disallowed_gm/Forc.lock | 5 ++ .../should_fail/disallowed_gm/Forc.toml | 3 + .../should_fail/illegal_break/Forc.lock | 9 ++- .../should_fail/illegal_break/Forc.toml | 1 + .../should_fail/impl_self_recursive/Forc.lock | 9 ++- .../should_fail/impl_self_recursive/Forc.toml | 3 +- .../insufficient_type_info/Forc.lock | 5 ++ .../insufficient_type_info/Forc.toml | 5 +- .../should_fail/multiple_impl_fns/Forc.lock | 9 ++- .../should_fail/multiple_impl_fns/Forc.toml | 1 + .../return_in_strange_positions/test.toml | 4 +- .../should_fail/simple_generics/Forc.lock | 9 ++- .../should_fail/simple_generics/Forc.toml | 3 + .../should_fail/storage_in_script/Forc.lock | 9 ++- .../should_fail/storage_in_script/Forc.toml | 1 + .../language/array_generics/Forc.toml | 3 + .../language/associated_const_abi/Forc.toml | 3 + .../associated_const_abi_default/Forc.toml | 3 + .../associated_const_impl_multiple/Forc.toml | 3 + .../associated_const_trait_method/Forc.toml | 3 + .../should_pass/language/eq_and_neq/test.toml | 2 +- .../language/generic_functions/Forc.toml | 3 + .../language/generic_structs/Forc.toml | 3 + .../language/generic_transpose/test.toml | 2 +- .../language/mut_ref_empty_type/test.toml | 2 +- .../language/mutable_and_initd/test.toml | 2 +- .../mutable_arrays_multiple_nested/Forc.toml | 3 + .../Forc.toml | 3 + .../ref_mutable_fn_args_u32/Forc.toml | 3 + .../dereferencing_operator_star/test.toml | 5 +- .../language/ret_string_in_struct/Forc.toml | 3 + .../language/retd_struct/Forc.toml | 3 + .../language/struct_init_reorder/Forc.toml | 3 + .../language/unary_not_basic_2/test.toml | 4 +- .../language/where_clause_functions/test.toml | 4 +- .../Forc.lock | 9 ++- .../Forc.toml | 3 + .../Forc.lock | 9 ++- .../Forc.toml | 3 + .../Forc.lock | 9 ++- .../Forc.toml | 3 + .../Forc.lock | 9 ++- .../Forc.toml | 3 + .../Forc.lock | 19 ++++--- .../Forc.toml | 1 + 62 files changed, 275 insertions(+), 116 deletions(-) diff --git a/sway-core/src/ir_generation/const_eval.rs b/sway-core/src/ir_generation/const_eval.rs index ad01563a8f4..9cf0661a103 100644 --- a/sway-core/src/ir_generation/const_eval.rs +++ b/sway-core/src/ir_generation/const_eval.rs @@ -244,9 +244,13 @@ pub(crate) fn compile_constant_expression_to_constant( // Special case functions because the span in `const_expr` is to the inlined function // definition, rather than the actual call site. ty::TyExpressionVariant::FunctionApplication { call_path, .. } => { - Err(CompileError::NonConstantDeclValue { - span: call_path.span(), - }) + let span = call_path.span(); + let span = if span == Span::dummy() { + const_expr.span.clone() + } else { + span + }; + Err(CompileError::NonConstantDeclValue { span }) } _otherwise => Err(CompileError::NonConstantDeclValue { span: const_expr.span.clone(), diff --git a/sway-core/src/language/ty/program.rs b/sway-core/src/language/ty/program.rs index d15bda1deea..1952a6e6318 100644 --- a/sway-core/src/language/ty/program.rs +++ b/sway-core/src/language/ty/program.rs @@ -44,6 +44,18 @@ fn get_type_not_allowed_error( }) } +fn check_no_ref_main(engines: &Engines, handler: &Handler, main_function: &DeclId) { + let main_function = engines.de().get_function(main_function); + for param in &main_function.parameters { + if param.is_reference && param.is_mutable { + handler.emit_err(CompileError::RefMutableNotAllowedInMain { + param_name: param.name.clone(), + span: param.name.span(), + }); + } + } +} + impl TyProgram { /// Validate the root module given the expected program kind. pub fn validate_root( @@ -237,7 +249,11 @@ impl TyProgram { TyProgramKind::Contract { entry_function: if experimental.new_encoding { - assert!(entries.len() == 1); + if entries.len() != 1 { + return Err(handler.emit_err(CompileError::CouldNotGenerateEntry { + span: Span::dummy(), + })); + } Some(entries[0]) } else { None @@ -276,8 +292,15 @@ impl TyProgram { return Err(last_error.unwrap()); } + // check if no ref mut arguments passed to a `main()` in a `script` or `predicate`. + check_no_ref_main(engines, handler, &mains[0]); + let (entry_fn_id, main_fn_id) = if experimental.new_encoding { - assert!(entries.len() == 1); + if entries.len() != 1 { + return Err(handler.emit_err(CompileError::CouldNotGenerateEntry { + span: Span::dummy(), + })); + } (entries[0], mains[0]) } else { assert!(entries.is_empty()); @@ -318,8 +341,15 @@ impl TyProgram { return Err(last_error.unwrap()); } + // check if no ref mut arguments passed to a `main()` in a `script` or `predicate`. + check_no_ref_main(engines, handler, &mains[0]); + let (entry_fn_id, main_fn_id) = if experimental.new_encoding { - assert!(entries.len() == 1); + if entries.len() != 1 { + return Err(handler.emit_err(CompileError::CouldNotGenerateEntry { + span: Span::dummy(), + })); + } (entries[0], mains[0]) } else { assert!(entries.is_empty()); @@ -380,23 +410,6 @@ impl TyProgram { } }; - // check if no ref mut arguments passed to a `main()` in a `script` or `predicate`. - match &typed_program_kind { - TyProgramKind::Script { main_function, .. } - | TyProgramKind::Predicate { main_function, .. } => { - let main_function = decl_engine.get_function(main_function); - for param in &main_function.parameters { - if param.is_reference && param.is_mutable { - handler.emit_err(CompileError::RefMutableNotAllowedInMain { - param_name: param.name.clone(), - span: param.name.span(), - }); - } - } - } - _ => (), - } - //configurables and constant cannot be str slice for c in configurables.iter() { if let Some(error) = get_type_not_allowed_error( @@ -426,6 +439,8 @@ impl TyProgram { } } + assert!(!handler.has_errors()); + Ok((typed_program_kind, declarations, configurables)) } diff --git a/sway-core/src/semantic_analysis/ast_node/declaration/auto_impl.rs b/sway-core/src/semantic_analysis/ast_node/declaration/auto_impl.rs index 04682893864..b0e62790066 100644 --- a/sway-core/src/semantic_analysis/ast_node/declaration/auto_impl.rs +++ b/sway-core/src/semantic_analysis/ast_node/declaration/auto_impl.rs @@ -9,7 +9,6 @@ use crate::{ semantic_analysis::TypeCheckContext, Engines, TypeId, TypeInfo, TypeParameter, }; -use itertools::Itertools; use sway_error::{ error::CompileError, handler::{ErrorEmitted, Handler}, @@ -555,7 +554,7 @@ where TypeInfo::RawUntypedPtr => "raw_ptr".into(), TypeInfo::RawUntypedSlice => "raw_slice".into(), TypeInfo::Alias { name, .. } => name.to_string(), - x => return None, + _ => return None, }; Some(name) @@ -676,12 +675,9 @@ where match entry_fn { Ok(entry_fn) => Ok(entry_fn), - Err(gen_handler) => { - handler.append(gen_handler); - Err(handler.emit_err(CompileError::CouldNotGenerateEntry { - span: Span::dummy(), - })) - } + Err(gen_handler) => Err(gen_handler.emit_err(CompileError::CouldNotGenerateEntry { + span: Span::dummy(), + })), } } @@ -732,12 +728,9 @@ where match entry_fn { Ok(entry_fn) => Ok(entry_fn), - Err(gen_handler) => { - handler.append(gen_handler); - Err(handler.emit_err(CompileError::CouldNotGenerateEntry { - span: Span::dummy(), - })) - } + Err(gen_handler) => Err(gen_handler.emit_err(CompileError::CouldNotGenerateEntry { + span: Span::dummy(), + })), } } @@ -805,12 +798,9 @@ where match entry_fn { Ok(entry_fn) => Ok(entry_fn), - Err(gen_handler) => { - handler.append(gen_handler); - Err(handler.emit_err(CompileError::CouldNotGenerateEntry { - span: Span::dummy(), - })) - } + Err(gen_handler) => Err(gen_handler.emit_err(CompileError::CouldNotGenerateEntry { + span: Span::dummy(), + })), } } } diff --git a/sway-core/src/semantic_analysis/cei_pattern_analysis.rs b/sway-core/src/semantic_analysis/cei_pattern_analysis.rs index 52d1b7f0f0d..6923836c185 100644 --- a/sway-core/src/semantic_analysis/cei_pattern_analysis.rs +++ b/sway-core/src/semantic_analysis/cei_pattern_analysis.rs @@ -84,6 +84,10 @@ fn analyze_contract(engines: &Engines, ast_nodes: &[ty::TyAstNode]) -> Vec = vec![]; for fn_decl in contract_entry_points(decl_engine, ast_nodes) { + // no need to analyze the entry fn + if fn_decl.name.as_str() == "__entry" { + continue; + } analyze_code_block(engines, &fn_decl.body, &fn_decl.name, &mut warnings); } warnings @@ -608,10 +612,12 @@ fn effects_of_intrinsic(intr: &sway_ast::Intrinsic) -> HashSet { StateClear | StateStoreWord | StateStoreQuad => HashSet::from([Effect::StorageWrite]), StateLoadWord | StateLoadQuad => HashSet::from([Effect::StorageRead]), Smo => HashSet::from([Effect::OutputMessage]), + ContractCall => HashSet::from([Effect::Interaction]), Revert | JmpMem | IsReferenceType | IsStrArray | SizeOfType | SizeOfVal | SizeOfStr - | ContractCall | ContractRet | AssertIsStrArray | ToStrArray | Eq | Gt | Lt | Gtf - | AddrOf | Log | Add | Sub | Mul | Div | And | Or | Xor | Mod | Rsh | Lsh | PtrAdd - | PtrSub | Not => HashSet::new(), + | ContractRet | AssertIsStrArray | ToStrArray | Eq | Gt | Lt | Gtf | AddrOf | Log | Add + | Sub | Mul | Div | And | Or | Xor | Mod | Rsh | Lsh | PtrAdd | PtrSub | Not => { + HashSet::new() + } } } diff --git a/sway-core/src/semantic_analysis/module.rs b/sway-core/src/semantic_analysis/module.rs index d9523b524b9..48f10684b5e 100644 --- a/sway-core/src/semantic_analysis/module.rs +++ b/sway-core/src/semantic_analysis/module.rs @@ -329,22 +329,24 @@ impl ty::TyModule { (TreeType::Predicate, true) => { let mut fn_generator = auto_impl::EncodingAutoImplContext::new(&mut ctx).unwrap(); - let node = fn_generator.generate_predicate_entry( + if let Ok(node) = fn_generator.generate_predicate_entry( engines, main_decl.as_ref().unwrap(), handler, - )?; - all_nodes.push(node) + ) { + all_nodes.push(node) + } } (TreeType::Script, true) => { let mut fn_generator = auto_impl::EncodingAutoImplContext::new(&mut ctx).unwrap(); - let node = fn_generator.generate_script_entry( + if let Ok(node) = fn_generator.generate_script_entry( engines, main_decl.as_ref().unwrap(), handler, - )?; - all_nodes.push(node) + ) { + all_nodes.push(node) + } } (TreeType::Contract, _) => { // collect all contract methods @@ -357,14 +359,15 @@ impl ty::TyModule { let mut fn_generator = auto_impl::EncodingAutoImplContext::new(&mut ctx).unwrap(); - let node = fn_generator.generate_contract_entry( + if let Ok(node) = fn_generator.generate_contract_entry( engines, parsed.span.source_id().map(|x| x.module_id()), &contract_fns, fallback_fn, handler, - )?; - all_nodes.push(node) + ) { + all_nodes.push(node) + } } _ => {} } diff --git a/sway-error/src/error.rs b/sway-error/src/error.rs index 0cf59947c4e..7459ad2b70e 100644 --- a/sway-error/src/error.rs +++ b/sway-error/src/error.rs @@ -887,7 +887,7 @@ pub enum CompileError { FallbackFnsAreContractOnly { span: Span }, #[error("Fallback functions cannot have parameters")] FallbackFnsCannotHaveParameters { span: Span }, - #[error("Could not generate the entry method because one of the arguments does not implement AbiEncode/AbiDecode")] + #[error("Could not generate the entry method. See errors above for more details.")] CouldNotGenerateEntry { span: Span }, } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/src/main.sw b/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/src/main.sw index 71bcf7aff4f..80cb1603143 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/src/main.sw +++ b/test/src/e2e_vm_tests/test_programs/should_fail/chained_if_let_missing_branch/src/main.sw @@ -1,10 +1,5 @@ script; -enum Result { - Ok: T, - Err: E, -} - // should return 5 fn main() -> u64 { let result_a = Result::Ok::(5u64); diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.lock index 0962ff8ee89..a2a5e648d5a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'configurables_are_not_const' -source = 'member' +name = "configurables_are_not_const" +source = "member" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-96EE05F4B3FB2E76" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.toml index aca14507558..93e229ae323 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/configurables_are_not_const/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" implicit-std = false license = "Apache-2.0" name = "configurables_are_not_const" + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.lock index d9b2415bd54..74d829edea7 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.lock @@ -1,7 +1,10 @@ [[package]] name = "const-instead-of-let" source = "member" -dependencies = ["std"] +dependencies = [ + "core", + "std", +] [[package]] name = "core" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.toml index 49d081c3dbe..da772329ce5 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.toml @@ -5,4 +5,5 @@ license = "Apache-2.0" name = "const-instead-of-let" [dependencies] +core = { path = "../../../../../../sway-lib-core" } std = { path = "../../../reduced_std_libs/sway-lib-std-assert" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/test.toml index ff039fdfc16..f6e31892d43 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/test.toml @@ -1,7 +1,7 @@ category = "fail" # check: $()error -# check: const-instead-of-let/src/main.sw:13:38 +# check: const-instead-of-let/src/main.sw:13 # check: $()const INVALID_CONST = contract_1.foo(); # nextln: $()Could not evaluate initializer to a const declaration. diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_a/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_a/Forc.toml index efc809bbf0e..8631fc1acab 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_a/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_a/Forc.toml @@ -6,6 +6,7 @@ license = "Apache-2.0" name = "contract_a" [dependencies] +core = { path = "../../../../../../../sway-lib-core" } std = { path = "../../../../reduced_std_libs/sway-lib-std-assert/" } [contract-dependencies] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.lock index f4e9b9dac96..708b5a380e9 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.lock @@ -1,8 +1,14 @@ [[package]] -name = 'contract_b' -source = 'member' -contract-dependencies = ['contract_c (1111111111111111111111111111111111111111111111111111111111111111)'] +name = "contract_b" +source = "member" +dependencies = ["core"] +contract-dependencies = ["contract_c (1111111111111111111111111111111111111111111111111111111111111111)"] [[package]] -name = 'contract_c' -source = 'path+from-root-A309856C1410AE80' +name = "contract_c" +source = "path+from-root-A309856C1410AE80" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-A309856C1410AE80" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.toml index 9b95559eda3..4fec3700ef8 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_b/Forc.toml @@ -5,6 +5,8 @@ license = "Apache-2.0" name = "contract_b" implicit-std = false +[dependencies] +core = { path = "../../../../../../../sway-lib-core" } + [contract-dependencies] contract_c = { path = "../contract_c", salt = "0x1111111111111111111111111111111111111111111111111111111111111111" } - diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.lock index e16552317e5..eff97b7e216 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'contract_c' -source = 'member' +name = "contract_c" +source = "member" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-3C8F523D3E6B5411" diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.toml index 9d874484668..8eee489ee0c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/contract_dependencies_conflicting_salt/contract_c/Forc.toml @@ -5,3 +5,5 @@ license = "Apache-2.0" name = "contract_c" implicit-std = false +[dependencies] +core = { path = "../../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.lock index e152359c950..9d5066d90ae 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.lock @@ -1,3 +1,8 @@ +[[package]] +name = "core" +source = "path+from-root-3C5B50C68E15AEA9" + [[package]] name = "disallowed_gm" source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.toml index 3a7d3baed4d..0b88be6961a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/disallowed_gm/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "disallowed_gm" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.lock index 23f59e7b0c6..c20397f5108 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'illegal_break' -source = 'member' +name = "core" +source = "path+from-root-44425D2022F2E5F2" + +[[package]] +name = "illegal_break" +source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.toml index ce6fe5aab6e..d09b7f864fb 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/illegal_break/Forc.toml @@ -6,3 +6,4 @@ license = "Apache-2.0" name = "illegal_break" [dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.lock index c60aee96b19..8087e726d0b 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'impl_self_recursive' -source = 'member' +name = "core" +source = "path+from-root-7BB1412CA5179B4D" + +[[package]] +name = "impl_self_recursive" +source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.toml index 5024adec979..52451cbb140 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/impl_self_recursive/Forc.toml @@ -5,4 +5,5 @@ license = "Apache-2.0" name = "impl_self_recursive" implicit-std = false -[dependencies] \ No newline at end of file +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.lock index cb9b637ab88..55f80eab987 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.lock @@ -1,3 +1,8 @@ +[[package]] +name = "core" +source = "path+from-root-687D7B6A23A7C9DF" + [[package]] name = "insufficient_type_info" source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.toml index 8364767f06f..f6d09ddfe30 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/insufficient_type_info/Forc.toml @@ -3,4 +3,7 @@ authors = ["Fuel Labs "] entry = "main.sw" license = "Apache-2.0" name = "insufficient_type_info" -implicit-std = false \ No newline at end of file +implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.lock index 5a5aef2299d..b03d8c8d9f6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'multiple_impl_fns' -source = 'member' +name = "core" +source = "path+from-root-99C864323F6D5FE1" + +[[package]] +name = "multiple_impl_fns" +source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.toml index d8fbecc2a12..561dd9cd254 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/multiple_impl_fns/Forc.toml @@ -6,3 +6,4 @@ license = "Apache-2.0" name = "multiple_impl_fns" [dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/return_in_strange_positions/test.toml b/test/src/e2e_vm_tests/test_programs/should_fail/return_in_strange_positions/test.toml index d54217a61f6..fae9be4fb51 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/return_in_strange_positions/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/return_in_strange_positions/test.toml @@ -1,4 +1,4 @@ -category = "fail" +category = "disabled" # check: $()warning # check: return_in_strange_positions/src/main.sw:7:12 @@ -326,4 +326,4 @@ category = "fail" # nextln: $()found: (). # nextln: $()help: Return statement must return the declared function return type. -# check: $()Aborting due to 39 errors. \ No newline at end of file +# check: $()Aborting due to 39 errors. diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.lock index d0b99681657..92a98ba4416 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'simple_generics' -source = 'member' +name = "core" +source = "path+from-root-3607B3CB15B5EBEF" + +[[package]] +name = "simple_generics" +source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.toml index f28065b75be..0028c9198a4 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/simple_generics/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" license = "Apache-2.0" name = "simple_generics" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.lock index b8c56781753..85ee74436d1 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'storage_in_script' -source = 'member' +name = "core" +source = "path+from-root-BCD049287ABD70F1" + +[[package]] +name = "storage_in_script" +source = "member" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.toml index 67baf958eca..b0b7f95b89a 100644 --- a/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_fail/storage_in_script/Forc.toml @@ -6,3 +6,4 @@ license = "Apache-2.0" name = "storage_in_script" [dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/Forc.toml index 9df331e7025..c4aff4e81da 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/array_generics/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "array_generics" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi/Forc.toml index 73d409e4feb..2c1baea6fb0 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" license = "Apache-2.0" name = "associated_const_abi" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi_default/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi_default/Forc.toml index 61ad4b611c4..e4ec4183f83 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi_default/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_abi_default/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" license = "Apache-2.0" name = "associated_const_abi_default" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_impl_multiple/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_impl_multiple/Forc.toml index 1536ee12cf4..f93254c461f 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_impl_multiple/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_impl_multiple/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" license = "Apache-2.0" name = "associated_const_impl_multiple" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_trait_method/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_trait_method/Forc.toml index d4b95422123..b04d4b00584 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_trait_method/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/associated_const_trait_method/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" license = "Apache-2.0" name = "associated_const_trait_method" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml index ab0b427ff47..53fb5ce9a94 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/test.toml @@ -1,4 +1,4 @@ category = "run" expected_result = { action = "return", value = 1 } -expected_result_new_encoding = { action = "return_data", value = "0000000000000001" } +expected_result_new_encoding = { action = "return_data", value = "01" } validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/Forc.toml index cc70b3e3af2..64e3ab584a3 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_functions/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "generic_functions" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/Forc.toml index 1d98e82638f..a554f3eae06 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_structs/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "generic_structs" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_transpose/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_transpose/test.toml index ab0b427ff47..53fb5ce9a94 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_transpose/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/generic_transpose/test.toml @@ -1,4 +1,4 @@ category = "run" expected_result = { action = "return", value = 1 } -expected_result_new_encoding = { action = "return_data", value = "0000000000000001" } +expected_result_new_encoding = { action = "return_data", value = "01" } validate_abi = true diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/mut_ref_empty_type/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/mut_ref_empty_type/test.toml index 8533fc0c573..9d053cfcb6f 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/mut_ref_empty_type/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/mut_ref_empty_type/test.toml @@ -1,5 +1,5 @@ category = "run" expected_result = { action = "return", value = 42 } -expected_result_new_encoding = { action = "return_data", value = "0000000000000002A" } +expected_result_new_encoding = { action = "return_data", value = "000000000000002A" } validate_abi = true expected_warnings = 2 diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_and_initd/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_and_initd/test.toml index 404d0505dd5..efcbd67f43d 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_and_initd/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_and_initd/test.toml @@ -1,5 +1,5 @@ category = "run" expected_result = { action = "return", value = 1 } -expected_result_new_encoding = { action = "return_data", value = "0000000000000001" } +expected_result_new_encoding = { action = "return_data", value = "01" } validate_abi = false #expected_warnings = 5 diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_arrays_multiple_nested/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_arrays_multiple_nested/Forc.toml index 88a25c1bdd3..12b700c6c78 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_arrays_multiple_nested/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/mutable_arrays_multiple_nested/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "mutable_arrays_multiple_nested" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/Forc.toml index 090c54f013d..9e326c07ab1 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_struct_assign/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "ref_mutable_fn_args_struct_assign" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/Forc.toml index 72b2448575e..84519cf3897 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ref_mutable_fn_args_u32/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "ref_mutable_fn_args_u32" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/references/dereferencing_operator_star/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/references/dereferencing_operator_star/test.toml index b1a6137675f..ad0971b22ec 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/references/dereferencing_operator_star/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/references/dereferencing_operator_star/test.toml @@ -1,7 +1,6 @@ category = "run" expected_result = { action = "return", value = 42 } +expected_result_new_encoding = { action = "return_data", value = "000000000000002A" } + validate_abi = false expected_warnings = 9 - -expected_result_new_encoding = { action = "return_data", value = "0000000000000001" } - diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/Forc.toml index ce18e9925fd..858fd5ad28c 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/ret_string_in_struct/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" implicit-std = false license = "Apache-2.0" name = "ret_string_in_struct" + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/Forc.toml index d5e58dbc825..fb886037dfe 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/retd_struct/Forc.toml @@ -4,3 +4,6 @@ license = "Apache-2.0" name = "retd_struct" entry = "main.sw" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_init_reorder/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_init_reorder/Forc.toml index b2d7ea17948..222d5550f61 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_init_reorder/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/struct_init_reorder/Forc.toml @@ -4,3 +4,6 @@ entry = "main.sw" license = "Apache-2.0" name = "struct_init_reorder" implicit-std = false + +[dependencies] +core = { path = "../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml index 865faf5726f..53fb5ce9a94 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/unary_not_basic_2/test.toml @@ -1,6 +1,4 @@ category = "run" expected_result = { action = "return", value = 1 } +expected_result_new_encoding = { action = "return_data", value = "01" } validate_abi = true - -expected_result_new_encoding = { action = "return_data", value = "0000000000000001" } - diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/language/where_clause_functions/test.toml b/test/src/e2e_vm_tests/test_programs/should_pass/language/where_clause_functions/test.toml index ad40e6b0f63..7875c2c9eb6 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/language/where_clause_functions/test.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/language/where_clause_functions/test.toml @@ -1,7 +1,5 @@ category = "run" expected_result = { action = "return", value = 42 } +expected_result_new_encoding = { action = "return_data", value = "000000000000002A" } validate_abi = true expected_warnings = 9 - -expected_result_new_encoding = { action = "return_data", value = "0000000000000001" } - diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.lock index 1f1358dd63a..95b5bb42283 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'cei_pattern_violation_in_asm_block' -source = 'member' +name = "cei_pattern_violation_in_asm_block" +source = "member" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-47C86A4D273AB650" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.toml index c2dac6f008d..b190734e618 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block/Forc.toml @@ -4,3 +4,6 @@ authors = ["Fuel Labs "] entry = "main.sw" license = "Apache-2.0" implicit-std = false + +[dependencies] +core = { path = "../../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.lock index 68bdd2f2707..40484740da7 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'cei_pattern_violation_in_asm_block_bal' -source = 'member' +name = "cei_pattern_violation_in_asm_block_bal" +source = "member" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-B62D34EC41424E02" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.toml index a71de0c98d5..ee5cc582375 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_bal/Forc.toml @@ -4,3 +4,6 @@ authors = ["Fuel Labs "] entry = "main.sw" license = "Apache-2.0" implicit-std = false + +[dependencies] +core = { path = "../../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.lock index 6c75d48cac1..06e1414fe17 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'cei_pattern_violation_in_asm_block_read' -source = 'member' +name = "cei_pattern_violation_in_asm_block_read" +source = "member" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-32137B93369C5D83" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.toml index 5ee48b22436..28de505a9f9 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_read/Forc.toml @@ -4,3 +4,6 @@ authors = ["Fuel Labs "] entry = "main.sw" license = "Apache-2.0" implicit-std = false + +[dependencies] +core = { path = "../../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.lock index e753c850beb..c383cba7860 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.lock @@ -1,3 +1,8 @@ [[package]] -name = 'cei_pattern_violation_in_asm_block_smo' -source = 'member' +name = "cei_pattern_violation_in_asm_block_smo" +source = "member" +dependencies = ["core"] + +[[package]] +name = "core" +source = "path+from-root-633FC5F6A194FE18" diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.toml index 6266eae98d1..ef48869ce52 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_in_asm_block_smo/Forc.toml @@ -4,3 +4,6 @@ authors = ["Fuel Labs "] entry = "main.sw" license = "Apache-2.0" implicit-std = false + +[dependencies] +core = { path = "../../../../../../../sway-lib-core" } diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.lock b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.lock index 4706d0627bc..5015d6dfbe0 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.lock +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.lock @@ -1,13 +1,16 @@ [[package]] -name = 'cei_pattern_violation_more_complex_logic' -source = 'member' -dependencies = ['std'] +name = "cei_pattern_violation_more_complex_logic" +source = "member" +dependencies = [ + "core", + "std", +] [[package]] -name = 'core' -source = 'path+from-root-C4D8ECCE530DF143' +name = "core" +source = "path+from-root-C4D8ECCE530DF143" [[package]] -name = 'std' -source = 'path+from-root-C4D8ECCE530DF143' -dependencies = ['core'] +name = "std" +source = "path+from-root-C4D8ECCE530DF143" +dependencies = ["core"] diff --git a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.toml b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.toml index 458b2928a44..850ae157aa2 100644 --- a/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.toml +++ b/test/src/e2e_vm_tests/test_programs/should_pass/static_analysis/cei_pattern_violation_more_complex_logic/Forc.toml @@ -5,4 +5,5 @@ entry = "main.sw" license = "Apache-2.0" [dependencies] +core = { path = "../../../../../../../sway-lib-core" } std = { path = "../../../../../../../sway-lib-std" }