jdx/mise · error

tracked file cannot declare source, content, manifest, or…

Error message

tracked file {target} cannot declare source, content, manifest, or exclude

What it means

A dotfile entry whose mode resolves to `track` (the tracking mode) must not declare `source`, `content`, `manifest`, or `exclude`. Track mode manages an existing file in place; there is nothing to copy from or filter, so any of these keys is a contradiction and validate_incoming_files rejects the entry.

Solutions

  1. Delete the `source`, `content`, `manifest`, and `exclude` keys from the track-mode entry.
  2. If you intended to deploy a file from the dotfiles repo, use `mode = "copy"` or `mode = "symlink"` instead of track.
  3. If the file already exists at the target, drop the extra keys and let track manage it in place.

Example fix

// before
"~/.zshrc" = { mode = "track", source = "dotfiles/zshrc" }
// after
"~/.zshrc" = { mode = "track" }
Defensive patterns

Strategy: validation

Validate before calling

if entry_table.get("mode").and_then(|m| m.as_str()) == Some("track") {
    for banned in ["source", "content", "manifest", "exclude"] {
        assert!(!entry_table.contains_key(banned), "track entry must not set {banned}");
    }
}

Prevention

When it happens

Trigger: validate_incoming_files sees a dotfile table with `mode = "track"` (or defaulting to track) that also specifies `source`, `content`, `manifest`, or `exclude`, e.g. `"~/.zshrc" = { mode = "track", source = "~/dotfiles/zshrc" }`.

Common situations: Migrating an existing source-based entry to track mode without deleting the source/content keys; assuming track takes a source to bootstrap; pasting an exclude list copied from a symlink entry.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/bb529b1b981c8571. Report an issue: GitHub.

Appendix: source

Thrown at src/system/files.rs:722

                if content.is_some() && (mode.is_some() || exclude.is_some() || manifest.is_some())
                {
                    bail!(
                        "dotfile {target}: inline content does not support mode, exclude, or manifest"
                    );
                }
                let mode = match mode.as_deref() {
                    Some(value) => FileMode::parse(value).ok_or_else(|| {
                        eyre::eyre!("unknown dotfile mode {value:?} for {target}")
                    })?,
                    None => default_mode(),
                };
                if mode == FileMode::Track
                    && (source.is_some()
                        || content.is_some()
                        || manifest.is_some()
                        || exclude.is_some())
                {
                    bail!(
                        "tracked file {target} cannot declare source, content, manifest, or exclude"
                    );
                }
                if source.is_some() && content.is_some() {
                    bail!("dotfile {target} cannot declare both source and content");
                }
                if mode != FileMode::Track
                    && source.is_none()
                    && content.is_none()
                    && implied_variant_source.is_none()
                {
                    implied_source(&resolve_target_arg(&target))?;
                }
                if let Some(manifest) = manifest
                    && (FileManifest::parse(&manifest).is_none()
                        || !matches!(mode, FileMode::Copy | FileMode::SymlinkEach))
                {
                    bail!("invalid manifest {manifest:?} for dotfile {target}");

View on GitHub (pinned to 533346cc37)