GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(lsp): resolve JDTLS root to Gradle workspace root in monorepos by ChrisJamesHassell · Pull Request #14192 · anomalyco/opencode

Conversation

@ChrisJamesHassell

@ChrisJamesHassell ChrisJamesHassell commented Feb 18, 2026

Copy link
Copy Markdown

Closes #14191

Summary

  • JDTLS root function now walks up from the nearest subproject marker to find settings.gradle/settings.gradle.kts, so all subprojects in a Gradle monorepo share a single JDTLS instance instead of spawning one per subproject
  • JDTLS temp data directories are cleaned up on shutdown via Handle.cleanup

Verification

All 7 LSP tests pass (bun test test/lsp/ from packages/opencode), including 4 new tests covering workspace root resolution and cleanup. Typecheck clean.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ChrisJamesHassell
fix(lsp): resolve JDTLS root to Gradle workspace root in monorepos
0ea3fcd
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.
@github-actions

github-actions Bot commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Found 2 potentially related PRs (excluding the current PR #14192):

  1. PR fix(opencode): prefer monorepo roots for jdtls #14049 - "fix(opencode): prefer monorepo roots for jdtls"

    • fix(opencode): prefer monorepo roots for jdtls #14049
    • Directly related: Addresses similar issue with JDTLS and monorepo root resolution
  2. PR fix: Multiple jdtls LSPs eating memory in java monorepos #12123 - "fix: Multiple jdtls LSPs eating memory in java monorepos"

    • fix: Multiple jdtls LSPs eating memory in java monorepos #12123
    • Related: Addresses the same underlying problem of multiple JDTLS instances spawning in Gradle monorepos, causing memory issues

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChrisJamesHassell

ChrisJamesHassell commented Mar 5, 2026

Copy link
Copy Markdown
Author

Fixed in another PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ChrisJamesHassell ChrisJamesHassell closed this Mar 5, 2026
This was referenced May 22, 2026
JDTLS spawns separate process per module in Java Maven multi-module projects #28760
Closed
fix(lsp): resolve JDTLS root to topmost pom.xml in Java Maven multi-module projects #28761
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

JDTLS spawns separate process per subproject in Gradle monorepos

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@ChrisJamesHassell
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.