ramensoftware/windhawk · warning

the mod source , so its settings were not exported; this…

Error message

the mod source {cause}, so its settings were not exported; this offline archive references the mod instead of embedding it

What it means

For a REPOSITORY mod whose source cannot be read while its settings were requested, export emits 'the mod source <cause>, so its settings were not exported' — the mod is still exported as a reference (no settings), and in offline mode an extra clause notes the archive references rather than embeds it.

Solutions

  1. Reinstall the mod so its source is present, then re-export
  2. Import the resulting archive (the mod will be fetched from the repository by reference)
  3. Drop the settings selection for that mod if settings aren't needed
  4. Avoid --offline if online export can fetch the source from the repository

Example fix

null
Defensive patterns

Strategy: fallback

Validate before calling

// before export: confirm repository mod source copies are readable if settings are selected
if want_settings {
    if read_source(id).is_unusable() { eprintln!("{id}: settings will be dropped"); }
}

Try / catch

let res = export(...);
for w in &res.summary.warnings {
    if w.message.contains("settings were not exported") {
        eprintln!("reinstall {} to keep its settings in the archive", w.mod_id);
    }
}

Prevention

When it happens

Trigger: Running `data export` (especially `--offline`) with a repository mod selected whose installed source copy is missing/corrupt: settings canonicalization requires the source, so settings are dropped but the mod id/version reference is kept.

Common situations: Broken mod installs where the stored source vanished; offline exports on machines where the mod was never fully downloaded; re-exporting backups after cleanup tools removed mod files.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of ramensoftware/windhawk@61d99ed8e1 (2026-09-12). Data as JSON: /api/errors/c4ab508deed096cf. Report an issue: GitHub.

Appendix: source

Thrown at src/windhawk-core/core/src/services/user_data.rs:229

            SourceRead::Text(text) => source_text = Some(text),
            SourceRead::Unusable(cause) => {
                if is_local {
                    warnings.push(warn(
                        id,
                        format!("the mod's source {cause}, so it was not exported"),
                    ));
                    return Ok(None);
                }
                // A repository mod with no usable source (a broken install):
                // export it reference-only, without settings.
                let mut message =
                    format!("the mod source {cause}, so its settings were not exported");
                if offline {
                    message.push_str(
                        "; this offline archive references the mod instead of embedding it",
                    );
                }
                warnings.push(warn(id, message));
            }
        }
    }

    let settings = if want_settings {
        canonical_settings(session, language, id, source_text.as_deref(), warnings)?
    } else {
        None
    };

    // An all-default config carries no information (import resets a processed
    // mod's user-owned config to those same defaults), so it is dropped to keep
    // the archive lean.
    let config = if want_config {
        entry
            .config
            .as_ref()
            .map(project_user_owned_config)

View on GitHub (pinned to 61d99ed8e1)