{"record":{"id":"748791dc564e6510","repo":"denoland/deno","slug":"startup-order-has-only-symbol-count-symbols","errorCode":null,"errorMessage":"startup order {} has only {symbol_count} symbols","messagePattern":"startup order (.+?) has only (.+?) symbols","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/build.rs","lineNumber":515,"sourceCode":"  std::fs::write(&order_file, contents).unwrap_or_else(|error| {\n    panic!(\n      \"failed to write startup order {}: {error}\",\n      order_file.display()\n    )\n  });\n\n  let contents = std::fs::read_to_string(&order_file).unwrap_or_else(|error| {\n    panic!(\n      \"failed to validate startup order {}: {error}\",\n      order_file.display()\n    )\n  });\n  let symbol_count = contents\n    .lines()\n    .filter(|line| !line.is_empty() && !line.starts_with('#'))\n    .count();\n  if symbol_count < 1_000 {\n    panic!(\n      \"startup order {} has only {symbol_count} symbols\",\n      order_file.display()\n    );\n  }\n\n  let order_file = order_file.canonicalize().unwrap();\n  match target.as_str() {\n    \"aarch64-apple-darwin\" => println!(\n      \"cargo:rustc-link-arg-bin=deno=-Wl,-order_file,{}\",\n      order_file.display()\n    ),\n    \"aarch64-unknown-linux-gnu\" | \"x86_64-unknown-linux-gnu\" => {\n      println!(\n        \"cargo:rustc-link-arg-bin=deno=-Wl,--symbol-ordering-file={}\",\n        order_file.display()\n      );\n      println!(\"cargo:rustc-link-arg-bin=deno=-Wl,--no-warn-symbol-ordering\");\n    }","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/denoland/deno/blob/9ad36f7a2cce60488e6ec52283efb32efddaf93a/cli/build.rs#L497-L533","documentation":"Build-script panic in cli/build.rs. After reading back the copied order file, the script counts non-empty lines not starting with '#'. A real order file generated from a baseline release deno binary contains hundreds of thousands of symbols; fewer than 1,000 non-comment lines means the file is essentially not a valid order file (empty, a stub, a tiny hand-written list), and the build aborts.","triggerScenarios":"DENO_STARTUP_ORDER_FILE points at a near-empty file, a file of only comments, a truncated order, or a placeholder artifact while DENO_USE_STARTUP_ORDER=1 on a supported release build.","commonSituations":"Someone hand-writes a small order file to 'test the feature'; CI artifact glob matched an empty stub; a partial download produced only the file header.","solutions":["Count your lines: `grep -cv -e '^#' -e '^$' \"$DENO_STARTUP_ORDER_FILE\"` — if it is under 1000, the file is wrong","Regenerate the order file from a baseline release binary using Deno's startup-order tooling","If you did not mean to enable the feature, unset DENO_USE_STARTUP_ORDER"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"n=$(grep -cv -e '^#' -e '^$' \"$DENO_STARTUP_ORDER_FILE\")\n[ \"$n\" -ge 1000 ] || { echo \"order file has only $n symbols; regenerate from a baseline release binary\"; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only feed order files produced by Deno's own startup-order generation tooling","Add the >=1000 symbol-line assertion to the artifact pipeline"],"tags":["build-script","validation","order-file","startup-order","file-format"],"backgroundTag":"invalid-file-format","analyzedSha":"9ad36f7a2cce60488e6ec52283efb32efddaf93a","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}