golang/go

plugin: report the version of Go used to build a plugin when a mismatch occurs

Open

#63,290 创建于 2023年9月29日

在 GitHub 查看
 (4 评论) (1 反应) (0 负责人)Go (19,008 fork)batch import
NeedsInvestigationcompiler/runtimehelp wanted

仓库指标

Star
 (133,883 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

What version of Go are you using (go version)?

Does this issue reproduce with the latest release?

Y

What operating system and processor architecture are you using (go env)?

What did you do?

go build -buildmode=plugin -o ./handler.so ./main.go

Then when I tried to use it with another program:

2023/09/29 02:11:29 main.go:26: plugin error: plugin.Open("/plugin/handler"): plugin was built with a different version of package google.golang.org/protobuf/internal/pragma

What did you expect to see?

It should tell me what the different version is so I can match it.

What did you see instead?

Nothing other than a not very useful message telling me that I have the wrong version, but not what the correct version should be.

贡献者指南