jdx/mise · error
" ". : block and source are mutually exclusive, ignoring…
Error message
"{path_raw}".{id}: block and source are mutually exclusive, ignoring entry What it means
An edit entry may specify its content either inline via `block` or from an external file via `source`, but not both. When `resolve_entry` sees `(Some(block), Some(source))` it cannot decide which content wins, so it bails and ignores the entry.
Solutions
- Remove `block` and keep `source` if content should come from the file.
- Remove `source` and keep `block` if content is inline.
- Re-run the edits command and confirm the entry is no longer ignored.
Example fix
# before [dotfiles."~/.zshrc".aliases] block = "alias ll='ls -la'" source = "~/dotfiles/aliases.sh" # after [dotfiles."~/.zshrc".aliases] source = "~/dotfiles/aliases.sh"
Defensive patterns
Strategy: validation
Validate before calling
if e.block.is_some() && e.source.is_some() {
return Err("entry sets both block and source; keep exactly one".into());
} Type guard
fn content_origin(e: &EditEntry) -> Option<&str> {
match (e.block.as_ref(), e.source.as_ref()) {
(Some(_), Some(_)) => None,
(other, _) => other.map(|_| "ok"),
}
} Prevention
- Pick one content origin per entry: inline `block` or external `source`, never both.
- When externalizing inline content to a file, remove `block` in the same commit.
- Review merged/shared config snippets for duplicated content fields.
When it happens
Trigger: A block-based entry sets both `block = "..."` and `source = "~/templates/foo.txt"`. `resolve_entry` bails at src/system/edits.rs:312 while resolving the content for `edits_from_config_files`.
Common situations: Users migrate an inline block to a sourced file and forget to remove `block`, or a shared/merged config adds `source` to an entry that already has inline `block` content.
Related errors
- destination variants require an explicit source when any…
- destination variants with inline content are not supported
- [dotfiles]." / ": block content may not contain its own…
- [dotfiles]." ": mode symlink-each requires a directory…
- files
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/894f6f81e8099c42.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/edits.rs:312
let is_block = entry.block.is_some() || entry.source.is_some();
let op = match (&is_block, &entry.line) {
(true, Some(_)) => {
bail!(
"\"{path_raw}\".{id}: block/source and line are mutually exclusive, ignoring entry"
)
}
(false, None) => {
bail!(
"\"{path_raw}\".{id}: no recognized operation (block, source, or line), ignoring entry"
)
}
(true, None) => {
if entry.position.is_some() {
bail!("\"{path_raw}\".{id}: position is only valid with line, ignoring entry")
}
let source = match (entry.block, entry.source) {
(Some(_), Some(_)) => {
bail!(
"\"{path_raw}\".{id}: block and source are mutually exclusive, ignoring entry"
)
}
(Some(inline), None) => BlockSource::Inline(inline),
(None, Some(src)) => {
let src = file::replace_path(&src);
let src = if src.is_relative() {
base.join(src)
} else {
src
};
origin.source = Some(src.clone());
BlockSource::File(src)
}
(None, None) => unreachable!("is_block"),
};
let template = match entry.template.as_deref() {
None => false,View on GitHub (pinned to 533346cc37)