{"record":{"id":"d9b76906b08949bd","repo":"ramensoftware/windhawk","slug":"compiler-warnings-warnings","errorCode":null,"errorMessage":"Compiler warnings:\n{warnings}","messagePattern":"Compiler warnings:\n(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/windhawk-core/cli/src/commands/mods/install.rs","lineNumber":295,"sourceCode":"/// the friendly label,\n/// shared with the `[compile:<arch>]` failure diagnostics. Other event variants\n/// (`Installing`, terminal) are not reachable here for a compile op.\nfn report_compile_progress(logger: Logger, event: &OperationEvent) {\n    if let OperationEvent::Progress { payload } = event\n        && let Some(triple) = payload.get(\"compileTarget\").and_then(Value::as_str)\n    {\n        logger.info(&format!(\"Compiling for {}...\", arch_label(triple)));\n    }\n}\n\n/// Surface a successful compile's clang warnings on stderr, each target's block\n/// already tagged with its triple by the core. Emitted via `logger.warn`, so\n/// `--quiet` keeps them (they ARE warnings). Empty - a clean compile or a\n/// precompiled download - prints nothing. This is the text-mode channel; the\n/// warnings also ride back on the result for `--json`.\nfn report_compile_warnings(logger: Logger, warnings: &str) {\n    if !warnings.is_empty() {\n        logger.warn(&format!(\"Compiler warnings:\\n{warnings}\"));\n    }\n}\n\npub(super) fn install(\n    env: &Environment,\n    args: ModInstallArgs,\n) -> Result<Box<dyn CommandResult>, CliError> {\n    let file_mode = args.file.is_some();\n\n    if !file_mode && args.id.is_none() {\n        return Err(CliError::usage(\n            \"mod install: provide <id> or --file <path>\",\n        ));\n    }\n    if file_mode && args.version.is_some() {\n        return Err(CliError::usage(\n            \"mod install: [version] is not valid with --file\",\n        ));","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/ramensoftware/windhawk/blob/61d99ed8e182e1af1b60109612b6763ad1b4b74e/src/windhawk-core/cli/src/commands/mods/install.rs#L277-L313","documentation":"Compiler diagnostics from building a mod during `mods install` are printed as a single 'Compiler warnings:\\n<warnings>' warning. It is emitted via logger.warn, so `--quiet` still shows it; empty warnings print nothing. The same warnings ride on the result for `--json` consumers.","triggerScenarios":"Installing a mod whose source compiles with warnings (deprecated APIs, unused variables, non-fatal type issues) — whether compiled locally or fetched precompiled-with-source.","commonSituations":"Installing community mods that target older Windhawk/compiler versions; mods using deprecated Metadata APIs; cross-compiling with the bundled toolchain flagging new lints.","solutions":["Read the warning text — installation still succeeded, these are non-fatal","Report or fix the mod source if the warning indicates deprecated API usage","Update the mod to a newer version that resolves the warnings","Ignore if the warnings are benign; they do not block the install"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if !result.compile_warnings.is_empty() { eprintln!(\"install proceeded with warnings\"); }","typeGuard":null,"tryCatchPattern":"match install(env, args).await {\n    Ok(r) if r.warnings.is_empty() => {},\n    Ok(r) => eprintln!(\"Compiler warnings:\\n{}\", r.warnings),\n    Err(e) => return Err(e),\n}","preventionTips":["Treat warnings as non-fatal but review for deprecated API usage","Prefer newer mod versions with clean compiles","Check warnings.json-equivalent output when using --json"],"tags":["cli","compile","mod-install","compiler"],"backgroundTag":"http-error-response","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"}