fix(lsp): resolve JDTLS root to Gradle workspace root in monorepos#14192
Open
ChrisJamesHassell wants to merge 1 commit intoanomalyco:devfrom
Open
fix(lsp): resolve JDTLS root to Gradle workspace root in monorepos#14192ChrisJamesHassell wants to merge 1 commit intoanomalyco:devfrom
ChrisJamesHassell wants to merge 1 commit intoanomalyco:devfrom
Conversation
JDTLS spawned a separate process per subproject in Gradle monorepos because the root function resolved to the nearest build.gradle instead of the workspace root (settings.gradle). Walk up from the subproject to find the Gradle workspace root, matching how RustAnalyzer already handles Cargo workspaces. Also clean up JDTLS temp data directories on shutdown via Handle.cleanup.
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Found 2 potentially related PRs (excluding the current PR #14192):
Both PRs appear to be addressing the same issue domain. PR #14049 looks particularly relevant as it specifically targets monorepo root preference for JDTLS, which is the core of PR #14192. |
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.
Closes #14191
Summary
settings.gradle/settings.gradle.kts, so all subprojects in a Gradle monorepo share a single JDTLS instance instead of spawning one per subprojectHandle.cleanupVerification
All 7 LSP tests pass (
bun test test/lsp/frompackages/opencode), including 4 new tests covering workspace root resolution and cleanup. Typecheck clean.