jdx/mise · error
incoming setup is missing required source
Error message
incoming setup is missing required source {} What it means
Thrown in sources() when a required source file neither has an incoming plan nor exists on disk, and no incoming child file will create it. mise cannot satisfy a declared dependency whose source is simply absent everywhere.
Solutions
- Commit the missing source file to the shared setup and re-pull
- Fix the typo/wrong path in the declaration listing the requirement
- If the file is meant to be generated locally, create it or remove it from required sources
Example fix
# before [[files]] path = "config/tool.toml" required_sources = ["templates/tool-template.toml"] # never committed # after git add templates/tool-template.toml && git commit -m 'add missing template'
Defensive patterns
Strategy: validation
Validate before calling
for src in "${required_sources[@]}"; do
[[ -e "$src" ]] || git cat-file -e "incoming:$src" 2>/dev/null || echo "missing required source: $src"
done Prevention
- Add files listed as required sources before pushing the setup change
- Use exact paths (no typos) in required_sources declarations
- Test a fresh pull of the shared setup into a clean checkout
When it happens
Trigger: A required source path is not in the incoming plans (None), does not exist on the local filesystem, and has_incoming_child finds no incoming entry that would populate it.
Common situations: A newly added requirement references a file the setup author forgot to commit; a typo in a source path; pulling only part of the shared setup.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- {}: {}
- incoming configuration must be a regular file
- incoming history.origin is machine-local configuration…
- incoming setup deletes required source
- required source is not a regular file
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/4396fca26c1dc249.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/history/sync/preflight.rs:154
let planned = plans
.iter()
.find(|plan| roots.locate(&plan.branch_path).path() == Some(source.as_path()));
match planned.and_then(|plan| plan.apply.as_ref()) {
Some(Some((mode, oid))) => {
if mode != "100644" && mode != "100755" {
bail!(
"required source is not a regular file: {}",
source.display()
);
}
repo.cat_object(oid)?;
}
Some(None) => bail!(
"incoming setup deletes required source {}",
source.display()
),
None if !source.exists() && !has_incoming_child(&roots, source, plans) => {
bail!(
"incoming setup is missing required source {}",
source.display()
);
}
None => {}
}
}
Ok(())
}
fn has_incoming_child(roots: &Roots, path: &Path, plans: &[PathPlan]) -> bool {
plans.iter().any(|plan| {
plan.apply.as_ref().is_some_and(Option::is_some)
&& roots
.locate(&plan.branch_path)
.path()
.is_some_and(|p| p.starts_with(path))
})View on GitHub (pinned to 533346cc37)