{"record":{"id":"754d6513420707ae","repo":"zed-industries/zed","slug":"could-not-find-package-or-crate-named-to-skip-to","errorCode":null,"errorMessage":"Could not find package or crate named '{}' to skip to","messagePattern":"Could not find package or crate named '(.+?)' to skip to","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tooling/xtask/src/tasks/gpui.rs","lineNumber":126,"sourceCode":"                should_skip = false;\n            } else {\n                println!(\"Skipping: {} ({})\", crate_name, package_name);\n                continue;\n            }\n        }\n\n        println!(\n            \"Publishing dependency: {} (package: {})\",\n            crate_name, package_name\n        );\n\n        update_crate_cargo_toml(package_name, crate_name, package_dir, new_version)?;\n        update_workspace_dependency_version(package_name, crate_name, new_version)?;\n        publish_crate(crate_name, dry_run)?;\n    }\n\n    if should_skip {\n        bail!(\n            \"Could not find package or crate named '{}' to skip to\",\n            skip_target\n        );\n    }\n\n    Ok(())\n}\n\nfn publish_gpui(new_version: &str, dry_run: bool) -> Result<()> {\n    update_crate_cargo_toml(\"gpui\", \"gpui\", \"crates\", new_version)?;\n\n    publish_crate(\"gpui\", dry_run)?;\n\n    Ok(())\n}\n\nfn update_crate_cargo_toml(\n    package_name: &str,","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/tooling/xtask/src/tasks/gpui.rs#L108-L144","documentation":"Thrown by `publish_dependencies` in tooling/xtask/src/tasks/gpui.rs:126 while rewriting a crate's Cargo.toml for publishing. The workspace [workspace.dependencies] table has no entry whose package name matches `package_name`, so the version-skip rewrite cannot proceed. It guards the automated GPUI publish pipeline against silently publishing a crate whose dependency metadata is missing or renamed.","triggerScenarios":"Running the xtask publish-gpui flow (via run_publish_gpui) when update_crate_cargo_toml / update_workspace_dependency_version looks up a package name in the workspace dependency table that does not exist — e.g. the dependency was renamed, removed from [workspace.dependencies], or the crate_name/package_name mapping passed in is stale.","commonSituations":"Renaming a crate without updating publish manifests; publishing a new crate version before adding it to [workspace.dependencies]; typos in package names in the publish task config; working from an old branch where the dependency entry hasn't landed yet.","solutions":["Add (or fix the name of) the package under [workspace.dependencies] in the root Cargo.toml.","Check the package_name passed into publish_dependencies / run_publish_gpui for typos or outdated names.","Rebase/pull so your branch contains the workspace dependency entry you expect.","Run `cargo metadata` or grep the root Cargo.toml to confirm the exact package key spelling."],"exampleFix":"// before (root Cargo.toml)\n[workspace.dependencies]\ngpui = { path = \"crates/gpui\" }\n\n// after — add the missing package\n[workspace.dependencies]\ngpui = { path = \"crates/gpui\" }\ngpui_macros = { path = \"crates/gpui_macros\" }","handlingStrategy":"validation","validationCode":"let deps = std::fs::read_to_string(\"Cargo.toml\")?;\nlet doc: toml::Table = toml::from_str(&deps)?;\nlet ws = doc.get(\"workspace\").and_then(|w| w.get(\"dependencies\")).and_then(|d| d.as_table());\nassert!(ws.map(|t| t.contains_key(\"gpui\")).unwrap_or(false), \"package missing from [workspace.dependencies]\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a canonical list of publishable packages and assert each appears in [workspace.dependencies] before running publish.","Grep the root Cargo.toml for the exact package key before invoking xtask."],"tags":["cargo","publishing","workspace-dependencies","rust"],"backgroundTag":"resource-not-found","analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-09-19T19:09:50.599Z","contentChangedAt":"2026-09-19T19:09:50.599Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}