{"record":{"id":"0390222eb275906d","repo":"FuelLabs/sway","slug":"no-entry-in-parent-manifest","errorCode":null,"errorMessage":"no entry in parent manifest","messagePattern":"no entry in parent manifest","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"forc-pkg/src/pkg.rs","lineNumber":1022,"sourceCode":"    let node_manifest = manifests\n        .get(dep_name)\n        .ok_or_else(|| anyhow!(\"Couldn't find manifest file for {}\", dep_name))?;\n    // Check the validity of the dependency path, including its path root.\n    let dep_path = dep_path(graph, node_manifest, dep_node, manifests).map_err(|e| {\n        anyhow!(\n            \"failed to construct path for dependency {:?}: {}\",\n            dep_name,\n            e\n        )\n    })?;\n\n    // Ensure the manifest is accessible.\n    let dep_manifest = PackageManifestFile::from_dir(&dep_path)?;\n\n    // Check that the dependency's source matches the entry in the parent manifest.\n    let dep_entry = node_manifest\n        .dep(dep_name)\n        .ok_or_else(|| anyhow!(\"no entry in parent manifest\"))?;\n    let dep_source =\n        Source::from_manifest_dep_patched(node_manifest, dep_name, dep_entry, manifests)?;\n    let dep_pkg = graph[dep_node].unpinned(&dep_path);\n    if dep_pkg.source != dep_source {\n        bail!(\"dependency node's source does not match manifest entry\");\n    }\n\n    validate_dep_manifest(&graph[dep_node], &dep_manifest, dep_edge)?;\n\n    Ok(dep_manifest)\n}\n/// Part of dependency validation, any checks related to the dependency's manifest content.\nfn validate_dep_manifest(\n    dep: &Pinned,\n    dep_manifest: &PackageManifestFile,\n    dep_edge: &Edge,\n) -> Result<()> {\n    let dep_program_type = dep_manifest.program_type()?;","sourceCodeStart":1004,"sourceCodeEnd":1040,"githubUrl":"https://github.com/FuelLabs/sway/blob/47e5e902faa42baf652dd6a0c88cd23390c1a614/forc-pkg/src/pkg.rs#L1004-L1040","documentation":"validate_dep found a graph edge named dep_name pointing at a dependency node, but node_manifest.dep(dep_name) returned None - the parent package's Forc.toml has no [dependencies]/[contract-dependencies] entry under that name. The edge set implied by the lock disagrees with the parent manifest.","triggerScenarios":"A dependency was removed from the parent Forc.toml while Forc.lock still holds the edge (validation pruning did not cover it - e.g. after patches renamed the relationship); a hand-edited lock with extra edges; branch switches desynchronizing manifest and lock.","commonSituations":"Stale or manually edited Forc.lock; removing a dep key from Forc.toml without rebuilding; merging manifests but not locks.","solutions":["Regenerate Forc.lock (delete it, or 'forc update') so edges are derived from current manifests.","Confirm the dependency entry exists under the correct section of the parent's Forc.toml if it is expected."],"exampleFix":"# before\nforc build   # no entry in parent manifest\n\n# after\nrm Forc.lock && forc build","handlingStrategy":"validation","validationCode":"for e in graph.edge_references() {\n    let parent = &graph[e.source()];\n    let parent_manifest = member_manifests.get(parent.name.as_str());\n    if let Some(pm) = parent_manifest {\n        if pm.dep(&e.weight().name).is_none() {\n            // graph edge not declared in the parent manifest: regenerate Forc.lock\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remove and add dependencies through Forc.toml edits followed by a rebuild, never through the lock.","Treat a hand-edited Forc.lock as corrupt until regenerated."],"tags":["lock-file","manifest","dependencies"],"backgroundTag":null,"analyzedSha":"47e5e902faa42baf652dd6a0c88cd23390c1a614","analyzedAt":"2026-08-16T07:57:45.555Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}