{"record":{"id":"eca41d9d6942c9ce","repo":"ramensoftware/windhawk","slug":"the-mod-has-no-recorded-version-so-it-was-not-exported","errorCode":null,"errorMessage":"the mod has no recorded version, so it was not exported","messagePattern":"the mod has no recorded version, so it was not exported","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/windhawk-core/core/src/services/user_data.rs","lineNumber":193,"sourceCode":"}\n\n/// Build one mod's archive entry, or `None` when it cannot be represented (a\n/// local mod with no usable source, a mod with no recorded version, or an entry\n/// the archive format itself refuses); a per-mod issue is pushed onto\n/// `warnings` in every case.\nfn export_mod(\n    session: &SessionInner,\n    selection: &UserDataSelection,\n    offline: bool,\n    language: &str,\n    id: &str,\n    entry: &InstalledModListEntry,\n    warnings: &mut Vec<ExportWarning>,\n) -> Result<Option<ArchiveMod>, CoreError> {\n    let is_local = ModId::str_is_local(id);\n    let version = installed_version(entry);\n    if version.is_empty() {\n        warnings.push(warn(\n            id,\n            \"the mod has no recorded version, so it was not exported\",\n        ));\n        return Ok(None);\n    }\n    let name = entry.metadata.as_ref().and_then(|m| m.name.clone());\n\n    let (want_settings, want_config) = facet_toggles(selection, id);\n    // A repository mod's source embeds only under an offline export; a local\n    // mod's source is always embedded (it exists nowhere else). The source is\n    // read locally whenever settings are selected, to canonicalize against its\n    // declared types, even when it is not embedded.\n    let embed = is_local || offline;\n    let need_source = embed || want_settings;\n    let mut source_text = None;\n    if need_source {\n        match read_source(session, id)? {\n            SourceRead::Text(text) => source_text = Some(text),","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/ramensoftware/windhawk/blob/61d99ed8e182e1af1b60109612b6763ad1b4b74e/src/windhawk-core/core/src/services/user_data.rs#L175-L211","documentation":"During user-data export, a mod whose installed entry has an empty recorded version cannot be represented in the archive (ArchiveMod requires a version), so it is skipped and a per-mod ExportWarning with this message is emitted. Export continues for other mods.","triggerScenarios":"Running `windhawk data export` while selecting a mod whose storage entry lacks a version — e.g. an install that never completed version recording or a hand-edited config mirror missing @version.","commonSituations":"Crashed or interrupted mod installs; mods installed by old versions that didn't record the version; corrupted mod storage state.","solutions":["Reinstall the mod so its version is recorded, then re-export","Ensure the mod's source carries a proper `// ==WindhawkMod== @version` header","Drop the mod from the export selection","Verify the mod shows a version in the Windhawk UI before exporting"],"exampleFix":"// before\n// ==WindhawkMod==\n// @id my-mod\n// ==/WindhawkMod==\n// after\n// ==WindhawkMod==\n// @id my-mod\n// @version 1.0.1\n// ==/WindhawkMod==","handlingStrategy":"validation","validationCode":"// before export: check every selected mod has a recorded version\nfor m in installed_mods.filter(|m| selection.includes(&m.id)) {\n    if m.version.is_empty() { eprintln!(\"{}: no version, will be skipped\", m.id); }\n}","typeGuard":"fn has_version(entry: &InstalledModListEntry) -> bool {\n    !entry.version.as_deref().unwrap_or(\"\").is_empty()\n}","tryCatchPattern":null,"preventionTips":["Keep @version headers in mod sources intact","Complete interrupted installs before exporting","Check export warnings for skipped mods after every export"],"tags":["export","user-data","mods","version"],"backgroundTag":"empty-required-field","analyzedSha":"61d99ed8e182e1af1b60109612b6763ad1b4b74e","analyzedAt":"2026-09-12T14:02:41.115Z","contentChangedAt":"2026-09-12T14:02:41.115Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}