Skip to content

cli-plugins/examples/helloworld/main.go cannot build #5956

New issue

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

Open
zhangguanzhang opened this issue Mar 24, 2025 · 5 comments
Open

cli-plugins/examples/helloworld/main.go cannot build #5956

zhangguanzhang opened this issue Mar 24, 2025 · 5 comments

Comments

@zhangguanzhang
Copy link

zhangguanzhang commented Mar 24, 2025

Description

$ go build -v -o helloworld main.go 
github.com/docker/docker/api/types/swarm/runtime
# github.com/docker/docker/api/types/swarm/runtime
/root/go/pkg/mod/github.com/docker/docker@v28.0.2+incompatible/api/types/swarm/runtime/plugin.pb.go:23:17: undefined: proto.GoGoProtoPackageIsVersion3
/root/go/pkg/mod/github.com/docker/docker@v28.0.2+incompatible/api/types/swarm/runtime/plugin.pb.go:66:38: undefined: proto.InternalMessageInfo
/root/go/pkg/mod/github.com/docker/docker@v28.0.2+incompatible/api/types/swarm/runtime/plugin.pb.go:142:43: undefined: proto.InternalMessageInfo

Reproduce

mkdir -p cli-test
cd cli-test
wget https://raw.githubusercontent.com/docker/cli/refs/heads/master/cli-plugins/examples/helloworld/main.go
go mod init test
go mod tidy
go build main.go

Expected behavior

No response

docker version

no

docker info

no

Additional Info

No response

@zhangguanzhang zhangguanzhang changed the title cli-plugins/examples/helloworld/main.go cannot build cli-plugins/examples/helloworld/main.go cannot build with v28.0.2 Mar 24, 2025
@zhangguanzhang
Copy link
Author

maybe link 4321293
@thaJeztah PTAL

@apocelipes
Copy link

Same problem with Go 1.24.1 Windows amd64:

Image

@BedivereZero
Copy link

Does cli-plugins/examples/helloworld need to be used together with vendor.mod? Cannot be used independently

@zhangguanzhang zhangguanzhang changed the title cli-plugins/examples/helloworld/main.go cannot build with v28.0.2 cli-plugins/examples/helloworld/main.go cannot build Mar 24, 2025
@BedivereZero
Copy link

go build --modfile=vendor.mod ./cli-plugins/examples/helloworld

Perhaps it should be used this way, I'm not sure.

@zhangguanzhang
Copy link
Author

@thaJeztah PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants