Skip to content

fix(navigation): 保留重载解析中的 Java 数组维度(#5) - #15

Merged
1lck merged 1 commit into
mainfrom
devin/issue-5-array-overloads
Nov 27, 2026
Merged

1lck merged 1 commit into
mainfrom
devin/issue-5-array-overloads

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Refs #5

Summary

  • 在成员类型和重载签名中保留 [],并让表达式解析传递数组类型。下标操作减少一维,重载评分区分数组、数组元素和标量。
  • 将 varargs 形参记录为数组类型,区分直接传入数组和传入展开后的元素。实现导航也按数组签名匹配。
  • 最小 fixture 和 OpenJDK 17 LSP 复测均通过。真实 JDK 中,buffer.write(key.getBytes(UTF_8)) 由 ByteArrayOutputStream.write(int)(第 110 行)改为 OutputStream.write(byte[])(第 126 行),buffer.write(42) 仍指向第 110 行。

验证

  • 通过数组、多维数组、同参数个数重载、varargs 和实现导航用例,以及 go vet ./... 与 go test -timeout=120s -race -count=1 ./...。
  • 通过打包、Linux x64/ARM64 归档检查和 Linux x64 已打包 LSP 的启动、符号请求及退出验证。

nav-bench

Linux x64、Go 1.27.3、Nacos 3.1.2(87aab1a)、OpenJDK 17 源码,关闭第三方依赖 JAR 导航。基线为 178c493。每个种子比较相同的 1,500 个定义位置,交替运行前后版本,每轮使用新进程和独立状态目录。

种子 有跳转结果 定义 p50 前 → 后 (ms) 定义 p99 前 → 后 (ms) 查询后 RSS 前 → 后 (MiB) 结束 RSS 前 → 后 (MiB) 采样峰值 RSS 前 → 后 (MiB)
2 1379/1500 → 1379/1500 0.309 → 0.324 2.735 → 2.271 34 → 33 37 → 37 39 → 37
3 1383/1500 → 1383/1500 0.297 → 0.322 1.776 → 1.768 33 → 33 37 → 37 36 → 39
5 1400/1500 → 1400/1500 0.374 → 0.360 2.117 → 2.174 33 → 34 37 → 37 37 → 37

有结果的比例衡量返回率。逐条对比(忽略 JDK 状态目录前缀)另有两处目标变化,源码核对分别落在 Math.max(float, float) 和 StringBuilder.append(char)。JDT LS、带完整依赖的 Nacos 工作区及 #5 的泛型替换和 lambda 子项留在本次验证范围之外。

Link to Devin session: https://app.devin.ai/sessions/4688c15a113f4a69b9b43d05cb3bd7c3
Open in Devin Desktop: https://app.devin.ai/desktop/session/4688c15a113f4a69b9b43d05cb3bd7c3?variant=devin
Requested by: @1lck

Refs #5

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 27, 2026 08:58
@1lck
1lck merged commit 51783c3 into main Nov 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant