zed-industries/zed · error
Could not find package or crate named
Error message
Could not find package or crate named '{}' to skip to What it means
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.
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.
Example fix
// before (root Cargo.toml)
[workspace.dependencies]
gpui = { path = "crates/gpui" }
// after — add the missing package
[workspace.dependencies]
gpui = { path = "crates/gpui" }
gpui_macros = { path = "crates/gpui_macros" } Defensive patterns
Strategy: validation
Validate before calling
let deps = std::fs::read_to_string("Cargo.toml")?;
let doc: toml::Table = toml::from_str(&deps)?;
let ws = doc.get("workspace").and_then(|w| w.get("dependencies")).and_then(|d| d.as_table());
assert!(ws.map(|t| t.contains_key("gpui")).unwrap_or(false), "package missing from [workspace.dependencies]"); Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- failed to build extension
- is not a table in workspace dependencies
- auto_compact threshold of 0 is not valid
- Baseten API returned
- Cannot list directory because its path matches the user's…
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-09-19).
Data as JSON: /api/errors/754d6513420707ae.
Report an issue: GitHub.
Appendix: source
Thrown at tooling/xtask/src/tasks/gpui.rs:126
should_skip = false;
} else {
println!("Skipping: {} ({})", crate_name, package_name);
continue;
}
}
println!(
"Publishing dependency: {} (package: {})",
crate_name, package_name
);
update_crate_cargo_toml(package_name, crate_name, package_dir, new_version)?;
update_workspace_dependency_version(package_name, crate_name, new_version)?;
publish_crate(crate_name, dry_run)?;
}
if should_skip {
bail!(
"Could not find package or crate named '{}' to skip to",
skip_target
);
}
Ok(())
}
fn publish_gpui(new_version: &str, dry_run: bool) -> Result<()> {
update_crate_cargo_toml("gpui", "gpui", "crates", new_version)?;
publish_crate("gpui", dry_run)?;
Ok(())
}
fn update_crate_cargo_toml(
package_name: &str,View on GitHub (pinned to 916fc2b8cb)