{"record":{"id":"2e1c4fb7ef1427f5","repo":"FuelLabs/sway","slug":"failed-to-canonicalize-dependency-path","errorCode":null,"errorMessage":"Failed to canonicalize dependency path {:?}: {}","messagePattern":"Failed to canonicalize dependency path (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"forc-pkg/src/source/mod.rs","lineNumber":173,"sourceCode":"    source: &'a T,\n    manifest_dir: &'a Path,\n}\n\n/// Error returned upon failed parsing of `SourcePinned::from_str`.\n#[derive(Clone, Debug)]\npub struct PinnedParseError;\n\nimpl Source {\n    /// Construct a source from path information collected from manifest file.\n    fn with_path_dependency(\n        relative_path: &Path,\n        manifest_dir: &Path,\n        member_manifests: &MemberManifestFiles,\n    ) -> Result<Self> {\n        let path = manifest_dir.join(relative_path);\n        let canonical_path = path\n            .canonicalize()\n            .map_err(|e| anyhow!(\"Failed to canonicalize dependency path {:?}: {}\", path, e))?;\n        // Check if path is a member of a workspace.\n        if member_manifests\n            .values()\n            .any(|pkg_manifest| pkg_manifest.dir() == canonical_path)\n        {\n            Ok(Source::Member(member::Source(canonical_path)))\n        } else {\n            Ok(Source::Path(canonical_path))\n        }\n    }\n\n    /// Construct a source from version information collected from manifest file.\n    fn with_version_dependency(\n        pkg_name: &str,\n        version: &str,\n        namespace: &reg::file_location::Namespace,\n    ) -> Result<Self> {\n        // TODO: update here once we are supporting non-exact versions (non `x.y.z` versions)","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/FuelLabs/sway/blob/47e5e902faa42baf652dd6a0c88cd23390c1a614/forc-pkg/src/source/mod.rs#L155-L191","documentation":"Error \"Failed to canonicalize dependency path {:?}: {}\" thrown in FuelLabs/sway.","triggerScenarios":"Thrown at forc-pkg/src/source/mod.rs:173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"47e5e902faa42baf652dd6a0c88cd23390c1a614","analyzedAt":"2026-08-16T07:57:45.555Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}