We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
この素晴らしいツールを作成・維持していただき、心から感謝いたします。 called は静的解析を行う際に非常に役立つツールであり、ぜひ日々の開発に使用したいと考えています。
今回、Go 1.23 の環境で called を利用する際に問題が発生したため、Issue を報告させていただきます。 問題の原因は called が依存している golang.org/x/tools のバージョンが古く、新しい構文(ジェネリクスなど)に対応していないことにあるようです。
以下のコマンドで called をインストールしました。
go install github.com/gostaticanalysis/called/cmd/called@latest
次のコマンドを実行しました。
go vet -vettool=$(which called) -called.funcs="log.Println" $(PACKAGES)
その結果、以下のようなエラーが発生しました。
panic: no concrete method: func (*sync/atomic.Pointer[any]).CompareAndSwap(old *any, new *any) (swapped bool) goroutine 26 [running]: golang.org/x/tools/go/ssa.(*Program).declaredFunc(0x5ed673?, 0xc000ae8480) ../pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:124 +0xdd golang.org/x/tools/go/ssa.(*Program).addMethod(0xc0003f8000, 0xc000abd490, 0xc000adb770) ../pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:86 +0x136 golang.org/x/tools/go/ssa.(*Program).needMethods(0xc0003f8000, {0x7bfb38, 0xc000abd480}, 0x0) ../pkg/mod/golang.org/x/[email protected]/go/ssa/methods.go:173 +0x6bf
golang.org/x/tools のバージョンを最新のものに更新することで、問題が解消されると考えています。 go get golang.org/x/tools と go mod tidy を実行して以下のように go.mod を修正することで正常に動作することを、私の環境で確認しました。
go get golang.org/x/tools
go mod tidy
module github.com/gostaticanalysis/called go 1.22.0 require ( github.com/gostaticanalysis/analysisutil v0.7.1 golang.org/x/tools v0.27.0 ) require ( github.com/gostaticanalysis/comment v1.4.2 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/sync v0.9.0 // indirect golang.org/x/text v0.20.0 // indirect )
他に何か追加情報が必要であれば提供します。 上記の更新作業をこちらのPRで出しましたが、他に必要な作業がありましたら迅速に対応いたします。
このIssueが参考になれば幸いです。引き続き、この素晴らしいツールの発展を応援しています。
The text was updated successfully, but these errors were encountered:
@tenntenn @iwata @zchee こちらいかがでしょう??
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
この素晴らしいツールを作成・維持していただき、心から感謝いたします。
called は静的解析を行う際に非常に役立つツールであり、ぜひ日々の開発に使用したいと考えています。
今回、Go 1.23 の環境で called を利用する際に問題が発生したため、Issue を報告させていただきます。
問題の原因は called が依存している golang.org/x/tools のバージョンが古く、新しい構文(ジェネリクスなど)に対応していないことにあるようです。
再現手順
以下のコマンドで called をインストールしました。
次のコマンドを実行しました。
その結果、以下のようなエラーが発生しました。
解決策の提案
golang.org/x/tools のバージョンを最新のものに更新することで、問題が解消されると考えています。
go get golang.org/x/tools
とgo mod tidy
を実行して以下のように go.mod を修正することで正常に動作することを、私の環境で確認しました。他に何か追加情報が必要であれば提供します。
上記の更新作業をこちらのPRで出しましたが、他に必要な作業がありましたら迅速に対応いたします。
このIssueが参考になれば幸いです。引き続き、この素晴らしいツールの発展を応援しています。
The text was updated successfully, but these errors were encountered: