Repository navigation
feat: add Scala, Swift, Lua, and Bash language servers, per-request timeouts, and PathClassifier - #167
Open
Space Goat (spacegoatai) wants to merge 1 commit into
Conversation
…imeouts, and PathClassifier
|
Space Goat (@spacegoatai) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR contributes several additive language servers and production hardening improvements developed while running
multilspyat scale across 750+ open-source repositories:1. Four New Language Servers (13 → 17 Supported Languages)
Language.SCALA) —MetalsServer:coursier+metalsbinary intolanguage_servers/metals_server/metals_bin/if not already onPATH.build.sbt), Maven (pom.xml), Mill (build.sc), and Gradle (build.gradle/build.gradle.kts) builds via Bloop (metals/build-import).Language.SWIFT) —SourceKitLSPServer:sourcekit-lspviaPATHorxcrun --find sourcekit-lspon macOS.Package.swift) workspaces and monitors background indexing notifications.Language.LUA) —LuaLSServer:lua-language-serverrelease binary (darwin-arm64,darwin-x64,linux-x64,linux-arm64,win32-x64) on first run.workspace/configurationand waits for initial workspace diagnosis before serving symbol queries.Language.BASH) —BashLanguageServer:bash-language-serverlocally vianpm(5.4.3) ifnode/npmare available, with a pure-Python AST/regex fallback fortextDocument/documentSymboland workspace-widetextDocument/definition/textDocument/referenceswhen Node.js is unavailable.2. Per-Request Timeout & Server Health Checks
MultilspyConfig.request_timeout: Optional[float] = 120.0(default 120s;Nonefor unlimited):clangd,rust-analyzer,eclipse.jdt.ls, etc.) from blockingSyncLanguageServercallers indefinitely onasyncio.run_coroutine_threadsafe(...).result(timeout=...).MultilspyException("LSP request <method> timed out after <N>s").LanguageServer.check_process_health()/SyncLanguageServer.check_process_health():3.
PathClassifier(multilspy.path_classifier)"local"(insiderepository_root_path),"stdlib"(language standard library / runtime SDK across Python, Go, Rust, JS/TS, Java, Kotlin, Scala, C/C++, C#, Ruby, Dart, Swift, Lua, Bash),"external"(third-party package caches such assite-packages,node_modules,.cargo/registry,.m2,.ivy2,pkg/mod), or"unknown".4. Tests
tests/multilspy/test_metals_unit.pytests/multilspy/test_sourcekit_unit.pytests/multilspy/test_lua_ls_unit.pytests/multilspy/test_bash_ls_unit.pytests/multilspy/test_request_timeout.pytests/multilspy/test_path_classifier.pyv0.1.1.(Happy to split this into smaller PRs by language/feature if the maintainers prefer!)