jdx/mise · error
removed workspace project {id:?} cannot define other overrid
Error message
removed workspace project {id:?} cannot define other overrides What it means
Each [monorepo.projects."<id>"] override in mise.toml is either a removal or a modification — not both. validate_override() rejects an entry that sets remove = true alongside any of root, metadata, depends, depends_add, or depends_remove, because a removed project (and all its edges) cannot meaningfully carry other configuration.
Source
Thrown at src/task/workspace.rs:1159
attach_suggestion(&mut task.suggestions.provenance.outputs);
}
if task.suggestions.cache.is_some() {
attach_suggestion(&mut task.suggestions.provenance.cache);
}
if task.suggestions.depends.is_some() {
attach_suggestion(&mut task.suggestions.provenance.depends);
}
}
fn validate_override(id: &ProjectId, config: &WorkspaceProjectOverride) -> Result<()> {
if config.remove
&& (config.root.is_some()
|| config.metadata.is_some()
|| config.depends.is_some()
|| !config.depends_add.is_empty()
|| !config.depends_remove.is_empty())
{
bail!("removed workspace project {id:?} cannot define other overrides");
}
if let Some(dependency) = config
.depends_add
.intersection(&config.depends_remove)
.next()
{
bail!("workspace project {id:?} cannot both add and remove dependency {dependency:?}");
}
Ok(())
}
fn parse_dependency_ids(
project_id: &ProjectId,
field: &str,
dependencies: &BTreeSet<String>,
) -> Result<BTreeSet<ProjectId>> {
dependencies
.iter()View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Keep the removal entry to remove = true only; delete root/metadata/depends/depends_add/depends_remove from it
- If you meant to redefine the project, drop remove = true and keep the other fields
- If config layering merged the keys, move the removal to the outermost file or ensure entries don't overlap
Example fix
# before (mise.toml) [monorepo.projects."cargo:legacy"] remove = true root = "crates/legacy" depends_remove = ["cargo:shared"] # after [monorepo.projects."cargo:legacy"] remove = true
Defensive patterns
Strategy: validation
Validate before calling
for (raw_id, cfg) in &overrides {
if cfg.remove
&& (cfg.root.is_some() || cfg.metadata.is_some() || cfg.depends.is_some()
|| !cfg.depends_add.is_empty() || !cfg.depends_remove.is_empty())
{
return Err(eyre::eyre!("entry {raw_id}: remove cannot be combined with other override fields"));
}
} Type guard
fn is_pure_removal(cfg: &WorkspaceProjectOverride) -> bool {
!(cfg.remove
&& (cfg.root.is_some() || cfg.metadata.is_some() || cfg.depends.is_some()
|| !cfg.depends_add.is_empty() || !cfg.depends_remove.is_empty()))
} Prevention
- Keep removal entries minimal: one key, remove = true
- When generating overrides programmatically, skip serialization of unset fields so removals never inherit defaults
- Review merged config layers (mise.local.toml) so a removal doesn't land on an entry that already defines depends/root
When it happens
Trigger: A mise.toml entry combining remove = true with e.g. depends_add, root, or metadata; copy-pasting an existing override block and adding remove = true without deleting the other keys; YAML/TOML merge tools layering a removal onto a base config that already defined depends.
Common situations: Trying to 'remove and recreate' a project in one entry; nested config layering (mise.toml + mise.local.toml) where an override merges with a base that has other fields; misunderstanding that removal implies edge cleanup is automatic so no depends adjustments are needed.
Related errors
- workspace project {id:?} cannot both add and remove dependen
- version_order must be "source" or "semver"
- absent bootstrap group '{name}' must not set gid or system
- present bootstrap user '{name}' requires a primary group
- present bootstrap user '{name}' must not set remove_home
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/56fbf655fd9ea2a4.
Report an issue: GitHub.