chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-08 07:00:27 +00:00
parent bea56feb63
commit d46af9cf1e
2 changed files with 7 additions and 14 deletions

View File

@ -1229,11 +1229,7 @@ export const JDTLS: Info = {
if (buildRoot) return buildRoot
// 3. Maven: walk up pom.xml chain verifying <module> relationships
const pomFiles = await Filesystem.findUp(
"pom.xml",
path.dirname(file),
ctx.directory,
)
const pomFiles = await Filesystem.findUp("pom.xml", path.dirname(file), ctx.directory)
if (pomFiles.length > 0) {
let root = path.dirname(pomFiles[0])
for (let i = 1; i < pomFiles.length; i++) {

View File

@ -93,7 +93,10 @@ describe("JDTLS.root", () => {
const workspace = path.join(tmpBase, "nested-independent")
await mkdirp(workspace)
// Parent pom WITHOUT <module>tools/sample</module>
await Bun.write(path.join(workspace, "pom.xml"), "<project><modules><module>module-a</module></modules></project>")
await Bun.write(
path.join(workspace, "pom.xml"),
"<project><modules><module>module-a</module></modules></project>",
)
// Independent project nested inside
const projectDir = path.join(workspace, "tools", "sample")
await mkdirp(projectDir)
@ -446,16 +449,10 @@ describe("JDTLS.root", () => {
await mkdirp(mavenSrc)
await touch(path.join(mavenSrc, "MavenApp.java"))
const gradleResult = await LSPServer.JDTLS.root(
path.join(gradleSrc, "GradleApp.java"),
makeCtx(workspace),
)
const gradleResult = await LSPServer.JDTLS.root(path.join(gradleSrc, "GradleApp.java"), makeCtx(workspace))
expect(gradleResult).toBe(gradleDir)
const mavenResult = await LSPServer.JDTLS.root(
path.join(mavenSrc, "MavenApp.java"),
makeCtx(workspace),
)
const mavenResult = await LSPServer.JDTLS.root(path.join(mavenSrc, "MavenApp.java"), makeCtx(workspace))
expect(mavenResult).toBe(mavenDir)
})
})