Skip to content

feat:(go) support collect interface method's deps#92

Merged
AsterDY merged 1 commit into
mainfrom
opt/go_inter_methond
Oct 10, 2025
Merged

feat:(go) support collect interface method's deps#92
AsterDY merged 1 commit into
mainfrom
opt/go_inter_methond

Conversation

@AsterDY
Copy link
Copy Markdown
Collaborator

@AsterDY AsterDY commented Sep 24, 2025

What type of PR is this?

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@Hoblovski
Copy link
Copy Markdown
Collaborator

这个还改了 type param 的依赖,但是 commit 只说了改 interface method
这是期望的行为吗?

$ diff main.json pr.json -Naur | head -n 40
--- main.json   2025-09-29 19:23:14.309509939 +0800
+++ pr.json     2025-09-29 19:23:47.907865425 +0800
@@ -27,6 +27,26 @@
               "EndOffset": 1036,
               "Content": "func CaseGenericFunc[U InterfaceA, T entity.InterfaceB, V any](a T, b U, c V) string {\n\treturn a.String() + fmt.Sprintf(\"%v\", c) + b.String()\n}",
               "Signature": "func CaseGenericFunc[U InterfaceA, T entity.InterfaceB, V any](a T, b U, c V) string",
+              "Params": [
+                {
+                  "ModPath": "a.b/c",
+                  "PkgPath": "a.b/c/pkg/entity",
+                  "Name": "InterfaceB",
+                  "File": "pkg/generic.go",
+                  "Line": 35,
+                  "StartOffset": 956,
+                  "EndOffset": 959
+                },
+                {
+                  "ModPath": "a.b/c",
+                  "PkgPath": "a.b/c/pkg",
+                  "Name": "InterfaceA",
+                  "File": "pkg/generic.go",
+                  "Line": 35,
+                  "StartOffset": 961,
+                  "EndOffset": 964
+                }
+              ],
               "Types": [
                 {
                   "ModPath": "a.b/c",
@@ -90,6 +110,40 @@

(regression 检测出来了,没报错。这个是 bug,main 已经修了)

@AsterDY
Copy link
Copy Markdown
Collaborator Author

AsterDY commented Oct 9, 2025

这个还改了 type param 的依赖,但是 commit 只说了改 interface method 这是期望的行为吗?

$ diff main.json pr.json -Naur | head -n 40
--- main.json   2025-09-29 19:23:14.309509939 +0800
+++ pr.json     2025-09-29 19:23:47.907865425 +0800
@@ -27,6 +27,26 @@
               "EndOffset": 1036,
               "Content": "func CaseGenericFunc[U InterfaceA, T entity.InterfaceB, V any](a T, b U, c V) string {\n\treturn a.String() + fmt.Sprintf(\"%v\", c) + b.String()\n}",
               "Signature": "func CaseGenericFunc[U InterfaceA, T entity.InterfaceB, V any](a T, b U, c V) string",
+              "Params": [
+                {
+                  "ModPath": "a.b/c",
+                  "PkgPath": "a.b/c/pkg/entity",
+                  "Name": "InterfaceB",
+                  "File": "pkg/generic.go",
+                  "Line": 35,
+                  "StartOffset": 956,
+                  "EndOffset": 959
+                },
+                {
+                  "ModPath": "a.b/c",
+                  "PkgPath": "a.b/c/pkg",
+                  "Name": "InterfaceA",
+                  "File": "pkg/generic.go",
+                  "Line": 35,
+                  "StartOffset": 961,
+                  "EndOffset": 964
+                }
+              ],
               "Types": [
                 {
                   "ModPath": "a.b/c",
@@ -90,6 +110,40 @@

(regression 检测出来了,没报错。这个是 bug,main 已经修了)

看起来符合预期,反倒是之前没有有点奇怪。。

@AsterDY AsterDY merged commit 601fc8a into main Oct 10, 2025
4 checks passed
@welkeyever welkeyever deleted the opt/go_inter_methond branch January 16, 2026 09:05
simuleite pushed a commit to simuleite/abcoder that referenced this pull request Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants