{"record":{"id":"91d41aaabf4238be","repo":"zed-industries/zed","slug":"no-permalink-available","errorCode":null,"errorMessage":"no permalink available","messagePattern":"no permalink available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/git_store.rs","lineNumber":2173,"sourceCode":"    ) -> Task<Result<url::Url>> {\n        let Some(file) = File::from_dyn(buffer.read(cx).file()) else {\n            return Task::ready(Err(anyhow!(\"buffer has no file\")));\n        };\n\n        let Some((repo, repo_path)) = self.repository_and_path_for_project_path(\n            &(file.worktree.read(cx).id(), file.path.clone()).into(),\n            cx,\n        ) else {\n            // If we're not in a Git repo, check whether this is a Rust source\n            // file in the Cargo registry (presumably opened with go-to-definition\n            // from a normal Rust file). If so, we can put together a permalink\n            // using crate metadata.\n            if buffer\n                .read(cx)\n                .language()\n                .is_none_or(|lang| lang.name() != \"Rust\")\n            {\n                return Task::ready(Err(anyhow!(\"no permalink available\")));\n            }\n            let file_path = file.worktree.read(cx).absolutize(&file.path);\n            return cx.spawn(async move |cx| {\n                let provider_registry = cx.update(GitHostingProviderRegistry::default_global);\n                get_permalink_in_rust_registry_src(provider_registry, file_path, selection)\n                    .context(\"no permalink available\")\n            });\n        };\n\n        let buffer_id = buffer.read(cx).remote_id();\n        let branch = repo.read(cx).branch.clone();\n        let remote = branch\n            .as_ref()\n            .and_then(|b| b.upstream.as_ref())\n            .and_then(|b| b.remote_name())\n            .unwrap_or(\"origin\")\n            .to_string();\n","sourceCodeStart":2155,"sourceCodeEnd":2191,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/project/src/git_store.rs#L2155-L2191","documentation":"Neither a git repo nor any known permalink provider matched the buffer's file, so no URL can be constructed for the selected lines. The file is not in a repository and not a Cargo-registry source that would have an alternative permalink scheme.","triggerScenarios":"Thrown at crates/project/src/git_store.rs:2173 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open the file from within its git repository so a remote permalink can be built","For dependency sources, use go-to-definition from a project file so registry-path detection applies"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}