{"record":{"id":"3f0cf622391de667","repo":"zed-industries/zed","slug":"cross-arch-clippy-not-supported-for-platform-arch","errorCode":null,"errorMessage":"cross-arch clippy not supported for {platform}/{arch}","messagePattern":"cross-arch clippy not supported for (.+?)/(.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tooling/xtask/src/tasks/workflows/run_tests.rs","lineNumber":623,"sourceCode":"        release_job(&[])\n            .runs_on(runners::LINUX_LARGE)\n            .add_step(steps::harden_runner())\n            .add_step(steps::checkout_repo())\n            .add_step(steps::setup_cargo_config(Platform::Linux))\n            .add_step(steps::cache_rust_dependencies_namespace())\n            .map(steps::install_linux_dependencies)\n            .add_step(steps::setup_sccache(Platform::Linux))\n            .add_step(steps::script(\"cargo build -p collab\"))\n            .add_step(steps::script(\"cargo build --workspace --bins --examples\"))\n            .add_step(steps::show_sccache_stats(Platform::Linux))\n            .add_step(steps::cleanup_cargo_config(Platform::Linux)),\n    ))\n}\n\npub(crate) fn clippy(platform: Platform, arch: Option<Arch>, harden: bool) -> NamedJob {\n    let target = arch.map(|arch| match platform {\n        Platform::Mac => platform.target_triple(arch),\n        _ => unimplemented!(\"cross-arch clippy not supported for {platform}/{arch}\"),\n    });\n    let runner = match platform {\n        Platform::Windows => runners::WINDOWS_DEFAULT,\n        Platform::Linux => runners::LINUX_DEFAULT,\n        Platform::Mac => runners::MAC_DEFAULT,\n    };\n    let mut job = release_job(&[])\n        .runs_on(runner)\n        .when(harden && platform == Platform::Linux, |this| {\n            this.add_step(steps::harden_runner())\n        })\n        .add_step(steps::checkout_repo())\n        .add_step(steps::setup_cargo_config(platform))\n        .when(\n            platform == Platform::Linux || platform == Platform::Mac,\n            |this| this.add_step(steps::cache_rust_dependencies_namespace()),\n        )\n        .when(","sourceCodeStart":605,"sourceCodeEnd":641,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/tooling/xtask/src/tasks/workflows/run_tests.rs#L605-L641","documentation":"The xtask workflow generator can run clippy jobs, but cross-architecture clippy (a non-default arch for the current platform) is only supported for macOS targets. For any other platform with a specified arch, it calls `unimplemented!()`, producing 'cross-arch clippy not supported for {platform}/{arch}'. This is a workflow-definition-time guard, not a runtime user error.","triggerScenarios":"Invoking the xtask test/clippy workflow generation with `--arch` (or equivalent) targeting a Linux or Windows platform with a specific architecture, e.g. `Platform::Linux` with `Arch::Aarch64`.","commonSituations":"CI matrix scripts trying to lint non-x86_64 Linux targets or non-default Windows arches via xtask, assuming feature parity with macOS cross-arch clippy.","solutions":["Omit the arch argument so clippy runs on the platform's default target (Linux/Windows default runners).","Extend the match to map Linux/Windows arch targets to their triples and compatible runners if cross-arch support is needed.","Run cross-arch linting via cross-compilation tooling (e.g. `cargo clippy --target <triple>`) outside the xtask workflow."],"exampleFix":"// before\n_ => unimplemented!(\"cross-arch clippy not supported for {platform}/{arch}\"),\n// after\n_ => {\n    let _ = arch; // fall back to default target\n    platform.target_triple(None)\n}","handlingStrategy":"validation","validationCode":"// only request cross-arch clippy on macOS\nif arch.is_some() && !matches!(platform, Platform::Mac) {\n    return Err(anyhow!(\"cross-arch clippy only supported on mac\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass an arch to clippy workflows for the Mac platform.","Use platform defaults for Linux/Windows lint jobs.","If cross-arch linting is needed, do it with explicit cargo --target invocations outside xtask."],"tags":["clippy","ci","xtask","platform","unimplemented"],"backgroundTag":"unsupported-platform","analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-09-19T19:09:50.599Z","contentChangedAt":"2026-09-19T19:09:50.599Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}