zed-industries/zed · error · Error
build failed
Error message
build failed
What it means
Bailed by copilot_lsp_native_binary_path (copilot.rs:1403) when env::consts::ARCH is not aarch64 or x86_64 — the only CPU architectures for which GitHub ships copilot-language-server-{platform}-{arm64|x64}. Like the platform check it precedes any filesystem or network work (called from get_copilot_lsp at copilot.rs:1366), so on an unsupported architecture the download is never even attempted; the error propagates into CopilotServer::Error.
Source
Thrown at script/randomized-test-minimize:96
process.stderr.write(`final test plan: ${outputPlanPath}\n`);
process.stderr.write(`final seed: ${failingSeed}\n`);
return failingSeed;
}
function buildTests() {
const { status } = spawnSync(
"cargo",
["test", "--no-run", ...CARGO_TEST_ARGS],
{
stdio: "inherit",
encoding: "utf8",
env: {
...process.env,
},
},
);
if (status !== 0) {
throw new Error("build failed");
}
}
function runTests(env) {
const { status, stdout } = spawnSync(
"cargo",
["test", ...CARGO_TEST_ARGS, "random_project_collaboration"],
{
stdio: "pipe",
encoding: "utf8",
env: {
...process.env,
...env,
},
},
);
if (status !== 0) {View on GitHub (pinned to bc538def45)
Solutions
- Do not attempt Copilot on this architecture — no server binary exists; disable edit predictions to silence the error.
- Switch to a supported build: aarch64 or x86_64 toolchain/OS (e.g. 64-bit Raspberry Pi OS with aarch64 kernel and userland).
- Run an x86_64/aarch64 environment via emulation or container (qemu-user, box64) so the process reports a supported ARCH.
- If self-hosting a compatible binary, map the architecture in copilot_lsp_native_binary_path and place the executable at node_modules/@github/copilot-language-server-<platform>-<arch>/copilot-language-server.
Example fix
// before
let architecture = match env::consts::ARCH {
"aarch64" => "arm64",
"x86_64" => "x64",
architecture => anyhow::bail!("unsupported architecture: {architecture}"),
};
// after: probe with a graceful, pre-download check the caller can branch on
fn supported_copilot_arch() -> Option<&'static str> {
match env::consts::ARCH {
"aarch64" => Some("arm64"),
"x86_64" => Some("x64"),
_ => None,
}
}
let Some(arch) = supported_copilot_arch() else {
return Ok(None); // caller disables copilot instead of erroring
}; Defensive patterns
Strategy: validation
Validate before calling
// Same idea as the platform check: constant per build, check once.
fn copilot_arch_supported() -> bool {
matches!(env::consts::ARCH, "aarch64" | "x86_64")
} Type guard
fn copilot_arch() -> Option<&'static str> {
match env::consts::ARCH {
"aarch64" => Some("arm64"),
"x86_64" => Some("x64"),
_ => None,
}
} Try / catch
// Prefer build-time elimination; runtime check only for clear diagnostics.
let Some(_arch) = copilot_arch() else {
anyhow::bail!("Copilot has no build for {}", env::consts::ARCH);
}; Prevention
- Build/distribute only for aarch64 and x86_64 targets when Copilot support is required.
- Use #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] to compile the integration out elsewhere.
- On armv7 hardware, use a 64-bit OS/userland so the process reports aarch64.
- Pair the arch check with the OS check — both must pass before attempting download.
When it happens
Trigger: Running the crate on 32-bit x86 (i686), 32-bit or non-Apple arm (arm, armv7, armebv7), riscv64, loongarch64, powerpc64, s390x, or wasm32 — any ARCH outside {aarch64, x86_64}. Deterministic per build target.
Common situations: Raspberry Pi (armv7/armhf) Linux builds; 32-bit x86 distros; emerging ports (riscv64, loongarch64) in community repos; CI jobs that accidentally build the workspace for an unsupported target; qemu-user environments reporting the guest arch.
Related errors
- Missing env var `ZED_SERVER_URL`
- Could not find UNIT_DATA in the file
- Failed to parse UNIT_DATA as JSON: ${e.message}
- HTTP error! status: ${response.status}
- GraphQL error: ${JSON.stringify(data.errors)}
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/a6a53e4854f04794.
Report an issue: GitHub.