diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0722fb..8a7a0a0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ Status of the `main` branch. Changes prior to the next official version change w * Language Servers: - Fix: Properly differentiate between raw and high-level symbol cache fingerprints, avoiding unnecessary invalidations of the raw cache when only the derived high-level representation changes + - Improve uv-based language server launch command compatibility: Use the more widely supported + `uv tool run` instead of `uv x` #1721 - Java (JDT-LS): add `runtimes` to `ls_specific_settings.java`, a list of extra JRE/JDK entries (`name`, `path`, optional `default`/`sources`/`javadoc`) passed through to JDT-LS's `java.configuration.runtimes`. Fixes silently broken JDK type resolution (`java.lang.Object` diff --git a/src/solidlsp/dependency_provider.py b/src/solidlsp/dependency_provider.py index d3826eba..386e14d5 100644 --- a/src/solidlsp/dependency_provider.py +++ b/src/solidlsp/dependency_provider.py @@ -214,12 +214,7 @@ class LanguageServerDependencyProviderUvx(LanguageServerDependencyProviderBaseCo entrypoint: str, python_version: str = DEFAULT_UVX_PYTHON_VERSION, ) -> list[str]: - """Build a command that runs a pinned PyPI package's console script on demand via ``uvx`` / ``uv x``. - - Resolution order: - 1. Prefer ``uvx`` (env var ``UVX`` or PATH lookup). - 2. Fall back to ``uv x`` if only ``uv`` is on PATH. - 3. Raise ``RuntimeError`` if neither is available. + """Build a command that runs a pinned PyPI package's console script on demand via ``uvx`` / ``uv tool run``. :param package: PyPI package name (e.g. ``"pyright"``). :param version: Pinned package version. @@ -234,7 +229,7 @@ class LanguageServerDependencyProviderUvx(LanguageServerDependencyProviderBaseCo uv_path = shutil.which("uv") if uv_path is not None: - return [uv_path, "x", *base_args] + return [uv_path, "tool", "run", *base_args] # `uv tool run` is the same as `uvx` raise RuntimeError("Could not find 'uvx' or 'uv' in PATH. Install uv (https://docs.astral.sh/uv/).")