{"record":{"id":"c8414c317a07448b","repo":"astral-sh/ruff","slug":"dependency-installation-failed","errorCode":null,"errorMessage":"Dependency installation failed: {}","messagePattern":"Dependency installation failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/ruff_benchmark/src/real_world_projects.rs","lineNumber":314,"sourceCode":"    }\n\n    // Install dependencies with date constraint in the isolated environment\n    let mut cmd = Command::new(\"uv\");\n    cmd.args([\n        \"pip\",\n        \"install\",\n        \"--python\",\n        venv_path.to_str().unwrap(),\n        \"--exclude-newer\",\n        max_dep_date,\n    ])\n    .args(dependencies);\n\n    let output = cmd\n        .output()\n        .context(\"Failed to execute uv pip install command\")?;\n\n    anyhow::ensure!(\n        output.status.success(),\n        \"Dependency installation failed: {}\",\n        String::from_utf8_lossy(&output.stderr)\n    );\n\n    Ok(())\n}\n\n/// Install dependencies using uv with date constraints\nfn install_dependencies(checkout: &Checkout) -> Result<()> {\n    let venv_path = checkout.venv_path();\n    let project = checkout.project();\n    install_dependencies_to_cache(\n        project.name,\n        project.dependencies,\n        &venv_path,\n        project.python_version,\n        project.max_dep_date,","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/astral-sh/ruff/blob/672bb4edf04c84f8b0753346359daee4057158f2/crates/ruff_benchmark/src/real_world_projects.rs#L296-L332","documentation":"The benchmark harness pins dependency freshness with `uv pip install --exclude-newer <date>` into the cached venv; a nonzero exit raises this error with uv's stderr. Failures come from resolution (unresolvable or yanked deps), the date constraint, or the network.","triggerScenarios":"An unreachable PyPI (network/proxy), a dependency that no longer resolves under the pinned max_dep_date, or a malformed date value for --exclude-newer.","commonSituations":"Proxied or offline CI; upstream deleting/yanking a version that the date-constrained resolver needs; edits to the benchmark dependency table introducing bad names or dates.","solutions":["Read the embedded stderr: resolver errors name the exact package and constraint","Check network/proxy access to PyPI and retry; uv downloads are cached, partial caches can be cleared with `uv cache clean`","Verify max_dep_date is a valid date for uv (YYYY-MM-DD or RFC 3339) and the dependency specifiers are valid requirement strings","If an upstream package broke the pin, update the benchmark's dependency list or date"],"exampleFix":"# before\n bench run fails: Dependency installation failed: error: Request to PyPI failed ...\n\n# after\nuv cache clean && cargo bench --bench <real-world-bench>","handlingStrategy":"retry","validationCode":"date -u -d \"$max_dep_date\" '+%Y-%m-%d' >/dev/null 2>&1 || {\n  echo \"max_dep_date '$max_dep_date' is not a valid date\" >&2\n  exit 1\n}\ncargo bench --bench \"$bench\"","typeGuard":null,"tryCatchPattern":"for i in 1 2 3; do\n  cargo bench --bench \"$bench\" && break\n  echo \"dependency install attempt $i failed; clearing uv cache\" >&2\n  uv cache clean\ndone","preventionTips":["Warm the uv cache in CI before benchmark runs (uv pip install with the same pins)","Keep max_dep_date values in YYYY-MM-DD form","When editing benchmark dependency lists, validate specifiers with `uv pip compile` first"],"tags":["benchmark","dependencies","network"],"backgroundTag":null,"analyzedSha":"672bb4edf04c84f8b0753346359daee4057158f2","analyzedAt":"2026-08-16T08:54:05.464Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}