{"record":{"id":"1c4dd2dc3de835fb","repo":"astral-sh/ruff","slug":"notfound","errorCode":"NotFound","errorMessage":"failed to resolve uv executable: {error}","messagePattern":"failed to resolve uv executable: (.+?)","errorType":"error_code","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/ty_project/src/uv/metadata.rs","lineNumber":86,"sourceCode":"            resolution: metadata.resolution,\n            module_owners: metadata.module_owners,\n        })\n    }\n}\n\n#[derive(Debug, Clone, PartialEq, Eq, Deserialize, get_size2::GetSize)]\npub(crate) struct WorkspaceMember {\n    pub(crate) name: Box<str>,\n    /// Directory containing the member's `pyproject.toml`.\n    pub(crate) path: SystemPathBuf,\n    #[serde(deserialize_with = \"string_interner::deserialize\")]\n    id: CharStr,\n}\n\n#[derive(Debug, Error)]\npub(crate) enum UvMetadataError {\n    #[error(\"Failed to invoke `uv workspace metadata`: {0}\")]\n    Invocation(#[source] std::io::Error),\n\n    #[error(\"`uv workspace metadata` failed with status {status}: {stderr}\")]\n    CommandFailed {\n        status: std::process::ExitStatus,\n        stderr: String,\n    },\n\n    #[error(\"invalid `uv workspace metadata` JSON: {0}\")]\n    InvalidMetadata(serde_json::Error),\n\n    #[error(\"non-Unicode {description} returned by `uv workspace metadata`: `{path}`\", path = path.display())]\n    NonUnicodePath {\n        description: &'static str,\n        path: PathBuf,\n    },\n\n    #[error(\"missing {description} returned by `uv workspace metadata`: `{path}`\")]\n    MissingDirectory {","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/astral-sh/ruff/blob/5bb508f59481c1a02d5c7ff8568b9ffd8a763eef/crates/ty_project/src/uv/metadata.rs#L68-L104","documentation":"When ty detects a uv workspace, it runs `uv workspace metadata --frozen --active` to learn the workspace root and environment. The uv binary is located via the `UV` env var, falling back to a PATH search (`system.which(\"uv\")`); any WhichError (not found, unreadable PATH entries, unresolvable executable) is converted to an io::Error of kind NotFound with this message, surfacing as UvWorkspaceError::Invocation during environment discovery.","triggerScenarios":"ty (CLI or LSP inside an editor) opens a uv-managed project while `uv` is not on the process's PATH and `UV` is unset, or `UV` points to a path that cannot be resolved or executed.","commonSituations":"macOS GUI editors that do not inherit the shell PATH where uv was installed; CI images without uv; uv installed in a cargo/bin directory while the editor is launched from the Dock; `UV` pointing at a moved binary.","solutions":["Install uv (`curl -LsSf https://astral.sh/uv/install.sh | sh`, brew, or pip) and restart the editor/terminal so PATH refreshes.","Set `UV` to the absolute path of the uv executable for the process running ty.","Launch GUI editors from a shell (`code .`) or fix the GUI environment's PATH (e.g. `launchctl setenv PATH ...` on macOS).","If the project should not be treated as a uv workspace, check for a stray [tool.uv] workspace marker or point ty at the intended Python environment in its settings."],"exampleFix":"# before: editor spawned without uv on PATH\n$ open -a 'Visual Studio Code' .   # ty logs: failed to resolve uv executable\n\n# after: pin the resolver via UV and launch from a shell\n$ export UV=\"$(command -v uv)\" && code .","handlingStrategy":"validation","validationCode":"#!/bin/sh\nif ! command -v uv >/dev/null 2>&1; then\n  echo \"uv not found on PATH; ty needs it for uv workspaces\" >&2\n  exit 1\nfi\nexport UV=\"$(command -v uv)\"   # pin it for children like the editor/ty","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install uv on every machine/CI image that opens uv-managed projects with ty.","Launch GUI editors from a shell or fix the GUI PATH so ~/.local/bin and cargo bins are visible.","Set UV to an absolute path in environments where PATH cannot be trusted."],"tags":["ty","uv","path","executable-not-found","environment"],"backgroundTag":"executable-not-found","analyzedSha":"5bb508f59481c1a02d5c7ff8568b9ffd8a763eef","analyzedAt":"2026-08-20T16:33:49.445Z","contentChangedAt":"2026-08-20T16:33:49.445Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}