{"record":{"id":"28f60732d6a12a5e","repo":"jdx/mise","slug":"dependency-locking-does-not-support-uvx-args-or-pipx-args","errorCode":null,"errorMessage":"{} dependency locking does not support uvx_args or pipx_args","messagePattern":"(.+?) dependency locking does not support uvx_args or pipx_args","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/pipx/lock.rs","lineNumber":62,"sourceCode":"            && !PipxOptions::new(&tv.request.options()).uvx_disabled()\n            && matches!(\n                self.tool_name().parse::<PipxRequest>(),\n                Ok(PipxRequest::Pypi(_))\n            )\n    }\n\n    pub(super) fn uv_lock_options_supported(&self, tv: &ToolVersion) -> bool {\n        let raw = tv.request.options();\n        let opts = PipxOptions::new(&raw);\n        [opts.uvx_args(), opts.pipx_args()]\n            .into_iter()\n            .flatten()\n            .all(|s| s.trim().is_empty())\n    }\n\n    pub(super) fn validate_lock_options(&self, tv: &ToolVersion) -> Result<()> {\n        if !self.uv_lock_options_supported(tv) {\n            bail!(\n                \"{} dependency locking does not support uvx_args or pipx_args\",\n                self.ba.short\n            );\n        }\n        if !self.uv_lock_allowed(tv) {\n            bail!(\n                \"{} has a uv dependency graph; use uv with a PyPI package to replay it\",\n                self.ba.short\n            );\n        }\n        Ok(())\n    }\n\n    async fn lock_uv_program(&self, config: &Arc<Config>) -> Result<PathBuf> {\n        let uv = self.spawnable_dependency(config, None, \"uv\").await\n            .ok_or_else(|| eyre!(\"Python dependency locks require uv >= {MIN_UV_VERSION}; install it with `mise use uv`\"))?;\n        let output = CmdLineRunner::new(&uv).arg(\"--version\").read().await?;\n        let version = output","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/pipx/lock.rs#L44-L80","documentation":"validate_lock_options in the pipx lock module rejects replaying/creating a uv dependency lock when uvx_args or pipx_args are configured. Custom uvx/pipx CLI arguments make the dependency resolution non-reproducible through the lock machinery, so the combination is disallowed.","triggerScenarios":"Running `mise lock` or installing from a lock (prepare_install_version, resolve_uv_lock, validate_uv_lock) for a pipx tool whose options set uvx_args or pipx_args with non-empty values while dependency locking is in play.","commonSituations":"Config carries extra uv CLI flags (e.g. --index-url, --python) passed via uvx_args; user tries to lock a tool that previously used custom args; migration of old config with args into a locked setup.","solutions":["Remove uvx_args/pipx_args from the tool options, then run `mise lock`","Keep uvx_args/pipx_args but skip dependency locking (install resolves version-only)","Fold needed flags into supported options where possible"],"exampleFix":"// before\n[tools]\n\"pipx:ruff\" = { version = \"latest\", uvx_args = \"--python 3.12\" }\n// after\n[tools]\n\"pipx:ruff\" = { version = \"latest\" }","handlingStrategy":"validation","validationCode":"if ((opts.uvx_args?.trim() || opts.pipx_args?.trim()) && lockEnabled)\n  throw new Error(\"uvx_args/pipx_args are incompatible with dependency locking\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose one: either custom uvx_args/pipx_args (no locking) or dependency locking (no custom args)","When adding args to a locked tool, remove the lock entry or run `mise lock` again after clearing args"],"tags":["pipx","uv","lockfile","cli-args"],"backgroundTag":"unsupported-config-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}