{"record":{"id":"ae88d4034302600b","repo":"FuelLabs/fuels-rs","slug":"consider-adding-script-name-project","errorCode":null,"errorMessage":"Consider adding: Script(name=\"{}\", project=...)","messagePattern":"Consider adding: Script\\(name=\"(.+?)\", project=\\.\\.\\.\\)","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/fuels-macros/src/setup_program_test/parsing/validations.rs","lineNumber":68,"sourceCode":"                ),\n            ]\n        })\n        .validate_no_errors()\n}\n\npub(crate) fn validate_all_scripts_are_known(\n    abigen_command: &AbigenCommand,\n    load_commands: &[LoadScriptCommand],\n) -> Result<()> {\n    extract_scripts_to_load(load_commands)\n        .difference(&names_of_program_bindings(\n            abigen_command,\n            ProgramType::Script,\n        ))\n        .flat_map(|unknown_contract| {\n            [\n                Error::new_spanned(unknown_contract, \"Script is unknown\"),\n                Error::new(\n                    abigen_command.span,\n                    format!(\n                        \"Consider adding: Script(name=\\\"{}\\\", project=...)\",\n                        unknown_contract.value()\n                    ),\n                ),\n            ]\n        })\n        .validate_no_errors()\n}\n\npub(crate) fn validate_zero_or_one_wallet_command_present(\n    commands: &[InitializeWalletCommand],\n) -> Result<()> {\n    if commands.len() > 1 {\n        commands\n            .iter()\n            .map(|command| Error::new(command.span, \"Only one `Wallets` command allowed\"))","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/FuelLabs/fuels-rs/blob/d9a250a51818dda64bfeb5ef7cc19cf27bdcd623/packages/fuels-macros/src/setup_program_test/parsing/validations.rs#L50-L86","documentation":"Compile-time validation error from setup_program_test, the script counterpart of the unknown-contract check: a LoadScript command references a script binding name that the Abigen command does not produce under ProgramType::Script. Each unknown name emits 'Script is unknown' on the literal plus this suggestion on the Abigen span.","triggerScenarios":"LoadScript(name = \"my_script\") where no script binding with that exact name exists in Abigen's scripts= list — typo, casing mismatch, the binding declared under contracts= instead, or the binding removed during cleanup.","commonSituations":"Renaming script bindings; mixing up which program type a binding was declared as; copying LoadScript lines between tests.","solutions":["Match the LoadScript name string exactly to a script binding in the Abigen command.","If missing, add it: Abigen(scripts = [(name = \"my_script\", project = \"../my_script\")]).","Confirm the binding sits under scripts=, not contracts=/predicates=."],"exampleFix":"// before\nsetup_program_test!(\n    Abigen(scripts = [(name = \"sum_script\", project = \"../sum\")]),\n    LoadScript(name = \"sum\"),\n)\n// after\nsetup_program_test!(\n    Abigen(scripts = [(name = \"sum_script\", project = \"../sum\")]),\n    LoadScript(name = \"sum_script\"),\n)","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep script bindings under scripts= in Abigen and reference the exact name in LoadScript.","Grep the macro block for a binding name after any rename.","Treat the 'Script is unknown' span as the authoritative location of the bad literal."],"tags":["rust","macro","compile-time","setup-program-test","script"],"backgroundTag":null,"analyzedSha":"d9a250a51818dda64bfeb5ef7cc19cf27bdcd623","analyzedAt":"2026-08-16T09:49:30.618Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}