Introduce DownloadedDependency abstraction with URL-keyed hash database

* Add DownloadedDependency abstraction to facilitate handling of downloaded
  and hash-verified dependencies.
  In CI, missing hashes raise an exception.
  For users, unverified downloads log a warning.
* Add DownloadedDependencyHashDatabase which manages a URL-keyed database
  of sha256 hashes. It can be conveniently updated incrementally through a
  script (src/solidlsp/resources/downloaded_dependency_hashes.json),
  provided that language server implementations provide DownloadedDependency
  instances statically

Applied in EclipseJDTLS:
* Replace the untyped nested-dict runtime dependency descriptors with DownloadedDependency instances
* Move the JDTLS version-pinning constants into DependencyProvider
* Replace the platform dependency dicts with the VSCodeJavaConfig dataclass

Utils:
 * Add FileUtils.ArchiveType to type archive types that were previously plain str
 * Add is_running_in_ci() to ls_utils

Updated memory on adding a language server accordingly.
This commit is contained in:
Dominik Jain authored and Dr. Dominik Jain committed 2026-08-03 01:34:24 +02:00
1 parent c7dbe3bd11
commit 9fc8033ece
11 files changed
+401 -231

No files matched your search

@@ -0,0 +1,7 @@
from sensai.util import logging
from solidlsp.language_servers.eclipse_jdtls import EclipseJDTLS
if __name__ == "__main__":
logging.configure()
EclipseJDTLS.DependencyProvider.update_dep_hashes()