再現方法は go-scanリポジトリで make -C examples/find-orphans
strings
、fmt
、encoding/json
、strconv
パッケージ内の型や関数が解決できないままポインタとして参照しようとしたため、大量のエラーが発生しています。
- エラーメッセージ:
invalid indirect of <Unresolved Function: ...> (type *object.UnresolvedFunction)
- 発生箇所:
time=2025-09-11T19:12:54.901+09:00 level=ERROR msg="unsupported assignment target: expected an identifier, selector or index expression, but got *ast.StarExpr" in_func=Assign in_func_pos=$HOME/ghq/github.com/podhmo/go-scan/minigo/evaluator/evaluator.go:2972:8 exec_pos=$HOME/ghq/github.com/podhmo/go-scan/symgo/evaluator/evaluator.go:2628 pos=1353171 | |
time=2025-09-11T19:12:54.902+09:00 level=ERROR msg="unsupported assignment target: expected an identifier, selector or index expression, but got *ast.StarExpr" in_func=Assign in_func_pos=$HOME/ghq/github.com/podhmo/go-scan/minigo/evaluator/evaluator.go:2972:8 exec_pos=$HOME/ghq/github.com/podhmo/go-scan/symgo/evaluator/evaluator.go:2628 pos=1353171 | |
time=2025-09-11T19:12:54.906+09:00 level=ERROR msg="unsupported assignment target: expected an identifier, selector or index expression, but got *ast.StarExpr" in_func=Assign in_func_pos=$HOME/ghq/github.com/podhmo/go-scan/minigo/evaluator/evaluator.go:2972:8 exec_pos=$HOME/ghq/github.com/podhmo/go-scan/symgo/evaluator/e |
time=2025-09-11T19:08:21.405+09:00 level=DEBUG source=$HOME/ghq/github.com/podhmo/go-scan/examples/find-orphans/main.go:109 msg="no go.work file found, falling back to go.mod scan" root=$HOME/ghq/github.com/podhmo/go-scan | |
time=2025-09-11T19:08:21.410+09:00 level=DEBUG source=$HOME/ghq/github.com/podhmo/go-scan/examples/find-orphans/main.go:175 msg="creating locators for workspace" count=9 modules="[$HOME/ghq/github.com/podhmo/go-scan/examples/convert $HOME/ghq/github.com/podhmo/go-scan/examples/convert-define $HOME/ghq/github.com/podhmo/go-scan/examples/deriving-all $HOME/ghq/github.com/podhmo/go-scan/examples/derivingbind $HOME/ghq/github.com/podhmo/go-scan/examples/derivingjson $HOME/ghq/github.com/podhmo/go-scan/examples/docgen $HOME/ghq/github.com/podhmo/go-scan/examples/minigo $HOME/ghq/github.com/podhmo/go-scan $HOME/ghq/github.com/podhmo/go-scan/integration_test]" | |
time=2025-09-11T19:08:21.466+09:00 level=INFO source=$HOME/ghq/github.com/podhmo/go-scan/examples/find-orphans/main.go:197 msg="* scan modul |
Of course. Here is a GitHub Actions workflow that achieves your specific goal.
This solution avoids using benchmark functions and instead uses go test -memprofile
directly on your integration tests. It then processes the resulting profile file to extract the total memory usage and posts a concise, easy-to-read summary as a comment on the Pull Request.
This workflow also includes the requested concurrency
setting to automatically cancel outdated checks when new commits are pushed to the same PR.
You can create a new file at .github/workflows/memory-profiling.yml
and paste the following content.
The integration tests are experiencing significant performance issues, taking ~7 seconds to complete with extreme memory usage (75GB+). This document outlines the identified bottlenecks and proposed optimizations.