{"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":"eyre::Report","httpStatus":null,"severity":"warning","filePath":"src/system/edits.rs","lineNumber":256,"sourceCode":"        },\n        EditTomlEntry::Table(table) => table,\n    };\n    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            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                    BlockSource::File(if src.is_relative() {\n                        base.join(src)\n                    } else {\n                        src\n                    })\n                }\n                (None, None) => unreachable!(\"is_block\"),\n            };\n            let template = match entry.template.as_deref() {\n                None => false,\n                Some(\"tera\") => true,\n                Some(other) => {","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/system/edits.rs#L238-L274","documentation":"A block edit's content can come from either the inline block = string or an external file via source =, but not both — there would be no rule for which content wins. The entry is warned about and skipped when both are set.","triggerScenarios":"An entry like { block = 'alias ll=ls', source = \"snippets/aliases.sh\" } in [dotfiles].","commonSituations":"Moving from inline to file-backed content and forgetting to delete block; copy-paste merging two example entries; intent to provide a fallback content (not supported — deliberately no fallback semantics).","solutions":["Keep source = and remove block = (recommended when content grows or is templated)","Or keep block = and remove source = for short inline content"],"exampleFix":"# before\n[dotfiles]\n\"~/.zshrc/aliases\" = { block = 'alias ll=ls -la', source = \"snippets/aliases.sh\" }\n\n# after\n[dotfiles]\n\"~/.zshrc/aliases\" = { source = \"snippets/aliases.sh\" }","handlingStrategy":"validation","validationCode":"python3 - <<'EOF'\nimport tomllib\nfor key, v in tomllib.load(open('mise.toml','rb')).get('dotfiles', {}).items():\n    if isinstance(v, dict):\n        assert not ('block' in v and 'source' in v), f'block and source both set: {key}'\nEOF","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Migrating inline block to source? Delete block in the same edit","There is no fallback semantics — exactly one content source per entry"],"tags":["dotfiles","edits","mutually-exclusive","validation"],"backgroundTag":"mutually-exclusive-config-keys","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}