{"record":{"id":"ad89add030b1b7f0","repo":"affaan-m/ECC","slug":"unknown-legacy-language-unknownlegacylanguages","errorCode":null,"errorMessage":"Unknown legacy language: ${unknownLegacyLanguages[0]}. Expected one of ${listLegacyCompatibilityLanguages().join(', ')}","messagePattern":"Unknown legacy language: (.+?)\\. Expected one of (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/lib/install-manifests.js","lineNumber":490,"sourceCode":"  if (target && !SUPPORTED_INSTALL_TARGETS.includes(target)) {\n    throw new Error(\n      `Unknown install target: ${target}. Expected one of ${SUPPORTED_INSTALL_TARGETS.join(', ')}`\n    );\n  }\n\n  const legacyLanguages = dedupeStrings(options.legacyLanguages)\n    .map(language => language.toLowerCase());\n  const normalizedLegacyLanguages = dedupeStrings(legacyLanguages);\n\n  if (normalizedLegacyLanguages.length === 0) {\n    throw new Error('No legacy languages were provided');\n  }\n\n  const unknownLegacyLanguages = normalizedLegacyLanguages\n    .filter(language => !Object.hasOwn(LEGACY_LANGUAGE_ALIAS_TO_CANONICAL, language));\n\n  if (unknownLegacyLanguages.length === 1) {\n    throw new Error(\n      `Unknown legacy language: ${unknownLegacyLanguages[0]}. Expected one of ${listLegacyCompatibilityLanguages().join(', ')}`\n    );\n  }\n\n  if (unknownLegacyLanguages.length > 1) {\n    throw new Error(\n      `Unknown legacy languages: ${unknownLegacyLanguages.join(', ')}. Expected one of ${listLegacyCompatibilityLanguages().join(', ')}`\n    );\n  }\n\n  const canonicalLegacyLanguages = normalizedLegacyLanguages\n    .map(language => LEGACY_LANGUAGE_ALIAS_TO_CANONICAL[language]);\n  const baseModuleIds = LEGACY_COMPAT_BASE_MODULE_IDS_BY_TARGET[target || 'claude']\n    || LEGACY_COMPAT_BASE_MODULE_IDS_BY_TARGET.claude;\n  const moduleIds = dedupeStrings([\n    ...baseModuleIds,\n    ...(target === 'antigravity'\n      ? []","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/lib/install-manifests.js#L472-L508","documentation":"Thrown by resolveLegacyCompatibilitySelection() when exactly one language in the normalized list is not a key in LEGACY_LANGUAGE_ALIAS_TO_CANONICAL. Aliases accepted include c, cpp, csharp, fsharp, go, golang, arkts, harmonyos, java, javascript, kotlin, perl, php, python, rails, ruby, rust, swift, typescript. The single-error branch produces a focused message that lists all valid languages.","triggerScenarios":"Passing legacyLanguages: ['rust', 'scala'] — scala is not supported. Also typos like 'javacript', or a language the user assumes is supported (e.g. 'elixir', 'haskell', 'dart') but is not in the map.","commonSituations":"User requests a language ECC has no rule set for; a wrapper forwards an arbitrary language string from project detection; case errors are NOT the cause because the function lowercases first.","solutions":["Pick a supported language from listLegacyCompatibilityLanguages().","Use aliases: 'golang' for go, 'harmonyos' for arkts, 'javascript' (mapped to typescript), 'kotlin' (mapped to java).","Drop the unsupported entry and continue with the rest if the language is non-critical.","Open an issue / add a custom module if you need a language ECC does not ship."],"exampleFix":"// before\nresolveLegacyCompatibilitySelection({ legacyLanguages: ['rust', 'scala'] });\n// after\nconst supported = new Set(require('./scripts/lib/install-manifests').listLegacyCompatibilityLanguages());\nconst legacyLanguages = ['rust', 'scala'].filter(l => supported.has(l.toLowerCase()));\nresolveLegacyCompatibilitySelection({ legacyLanguages });","handlingStrategy":"validation","validationCode":"const { listLegacyCompatibilityLanguages } = require('./scripts/lib/install-manifests');\nconst supported = new Set(listLegacyCompatibilityLanguages());\nconst langs = options.legacyLanguages.filter(l => supported.has(String(l || '').toLowerCase()));\nresolveLegacyCompatibilitySelection({ ...options, legacyLanguages: langs });","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Filter detected languages against listLegacyCompatibilityLanguages() before forwarding.","Remember aliases: golang->go, harmonyos->arkts, javascript->typescript, kotlin->java."],"tags":["install","validation","legacy","language"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}