{"record":{"id":"894f6f81e8099c42","repo":"jdx/mise","slug":"path-raw-id-block-and-source-are-mutually-e","errorCode":null,"errorMessage":"\"{path_raw}\".{id}: block and source are mutually exclusive, ignoring entry","messagePattern":"\"(.+?)\"\\.(.+?): block and source are mutually exclusive, ignoring entry","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/edits.rs","lineNumber":312,"sourceCode":"    let is_block = entry.block.is_some() || entry.source.is_some();\n    let op = match (&is_block, &entry.line) {\n        (true, Some(_)) => {\n            bail!(\n                \"\\\"{path_raw}\\\".{id}: block/source and line are mutually exclusive, ignoring entry\"\n            )\n        }\n        (false, None) => {\n            bail!(\n                \"\\\"{path_raw}\\\".{id}: no recognized operation (block, source, or line), ignoring entry\"\n            )\n        }\n        (true, None) => {\n            if entry.position.is_some() {\n                bail!(\"\\\"{path_raw}\\\".{id}: position is only valid with line, ignoring entry\")\n            }\n            let source = match (entry.block, entry.source) {\n                (Some(_), Some(_)) => {\n                    bail!(\n                        \"\\\"{path_raw}\\\".{id}: block and source are mutually exclusive, ignoring entry\"\n                    )\n                }\n                (Some(inline), None) => BlockSource::Inline(inline),\n                (None, Some(src)) => {\n                    let src = file::replace_path(&src);\n                    let src = if src.is_relative() {\n                        base.join(src)\n                    } else {\n                        src\n                    };\n                    origin.source = Some(src.clone());\n                    BlockSource::File(src)\n                }\n                (None, None) => unreachable!(\"is_block\"),\n            };\n            let template = match entry.template.as_deref() {\n                None => false,","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/edits.rs#L294-L330","documentation":"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.","triggerScenarios":"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`.","commonSituations":"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.","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."],"exampleFix":"# before\n[dotfiles.\"~/.zshrc\".aliases]\nblock = \"alias ll='ls -la'\"\nsource = \"~/dotfiles/aliases.sh\"\n\n# after\n[dotfiles.\"~/.zshrc\".aliases]\nsource = \"~/dotfiles/aliases.sh\"","handlingStrategy":"validation","validationCode":"if e.block.is_some() && e.source.is_some() {\n    return Err(\"entry sets both block and source; keep exactly one\".into());\n}","typeGuard":"fn content_origin(e: &EditEntry) -> Option<&str> {\n    match (e.block.as_ref(), e.source.as_ref()) {\n        (Some(_), Some(_)) => None,\n        (other, _) => other.map(|_| \"ok\"),\n    }\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["config","validation","dotfiles"],"backgroundTag":"mutually-exclusive-options","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}