jdx/mise · error
cannot track through symlinked parent ; explicitly track…
Error message
cannot track {} through symlinked parent {}; explicitly track the link itself and its real target instead What it means
Tracking a path through a symlinked parent would make history store an unstable, machine-specific path and could change the link's target bytes on restore. ensure_portable_ancestors walks each ancestor component and bails if any intermediate component is a symlink or junction, telling you to track the link and its target explicitly instead.
Solutions
- Track the symlink itself and its real target as separate explicit entries instead of paths beneath it.
- Track the real (resolved) path directly under home/config without traversing the link.
- Replace the intermediate symlink with a real directory if the layout allows.
Example fix
// before mise history track ~/dotfiles/vimrc # ~/dotfiles is a symlink // after mise history track ~/dotfiles # track the link itself mise history track ~/real/dotfiles/vimrc # and/or the real target
Defensive patterns
Strategy: validation
Validate before calling
fn passes_symlink(p: &Path) -> std::io::Result<bool> {
let mut cur = p.to_path_buf();
while let Some(parent) = cur.parent() {
if std::fs::symlink_metadata(&parent)?.file_type().is_symlink() { return Ok(false); }
cur = parent.to_path_buf();
}
Ok(true)
} Try / catch
match add_requests(reqs) {
Err(e) if e.to_string().contains("symlinked parent") => track_link_and_target_instead(),
other => other?,
} Prevention
- Track symlinked dotfile repos as the link + target, not paths beneath the link.
- Prefer real directories over intermediate symlinks in ~/.config.
- Check ancestors with `namei -l <path>` before tracking.
When it happens
Trigger: add_requests -> ensure_portable_ancestors with a path like ~/links/dotfiles/settings.json where `~/links/dotfiles` is a symlink; file::is_symlink_or_junction succeeds on an ancestor component.
Common situations: Dotfiles managed via a symlinked repo folder (e.g. ~/dotfiles symlinked into ~/.config); macOS setups linking ~/Library subpaths; junctions on Windows.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- a validated copy_link has a staged parent
- tracking requires a portable path under home or the mise…
- a parent directory is now a symlink; left untouched
- a provided source resolves to a path
- binary target is not an owned Caskroom symlink
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/b5fbb2e70b3dab11.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/history/tracked.rs:838
Some(components.collect::<PathBuf>())
};
let Some((base, rest)) = bases
.iter()
.filter_map(|base| relative(base).map(|rest| (base, rest)))
.max_by_key(|(base, _)| base.components().count())
else {
eyre::bail!(
"tracking requires a portable path under home or the mise configuration directory"
);
};
let mut ancestor = base.clone();
for component in rest
.components()
.take(rest.components().count().saturating_sub(1))
{
ancestor.push(component);
if file::is_symlink_or_junction(&ancestor) {
eyre::bail!(
"cannot track {} through symlinked parent {}; explicitly track the link itself and its real target instead",
display_path(path),
display_path(&ancestor)
);
}
}
Ok(())
}
/// Turns a display or absolute path into its snapshot-tree path.
pub(crate) fn display_to_tree_path(path: &str) -> String {
// the link itself, never its destination: a tracked symlink is captured
// as a link and addressed as one
let expanded = normalize_target(Path::new(path));
let config = normalize(&global_config_dir());
if let Ok(relative) = expanded.strip_prefix(config) {
return format!("config/{}", relative.to_string_lossy().replace('\\', "/"))
.trim_end_matches('/')View on GitHub (pinned to 533346cc37)