mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 06:17:58 +00:00
LanguageServerDependencyProviderUvx: Use 'uv tool run' instead of 'uv x' (more widely supported)
Resolves #1721
This commit is contained in:
1 parent
f5824231be
commit
5c85d961a0
2 files changed
+4
-7
No files matched your search
@@ -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`
|
||||
|
||||
@@ -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/).")
|
||||
|
||||
|
||||
Reference in new issue
Block a user