Closed
Description
Description
cobra v1.9.0 was just released.
I have a program that requires Docker CLI and Cobra. I have just upgraded my dependencies and and I get a compilation error:
Wails CLI v2.10
Executing: go mod tidy
• Generating bindings:
ERROR
# github.com/docker/cli/cli/command/completion
../../pkg/mod/github.com/docker/[email protected]+incompatible/cli/command/completion/functions.go:135:9: cannot use cobra.FixedCompletions(options, cobra.ShellCompDirectiveNoFileComp) (value of type cobra.CompletionFunc) as ValidArgsFn value in return statement
exit status 1
There seems to be some breaking changes associated with Cobra.
Reproduce
- go get -u
- try to compile (in my case with wails dev)
Expected behavior
should compile
docker version
Client:
Version: 27.5.1
API version: 1.47
Go version: go1.23.4
Git commit: tag v27.5.1
Built: Mon Jan 27 09:32:48 2025
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 27.5.1
API version: 1.47 (minimum version 1.24)
Go version: go1.23.4
Git commit: tag v27.5.1
Built: Mon Jan 27 09:32:48 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 2.0.1
GitCommit: UNSET
runc:
Version: 1.1.13
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:
docker info
Client:
Version: 27.5.1
Context: default
Debug Mode: false
Plugins:
compose: Docker Compose (Docker Inc.)
Version: v2.29.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 25
Running: 0
Paused: 0
Stopped: 25
Images: 22
Server Version: 27.5.1
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: UNSET
runc version:
init version:
Security Options:
seccomp
Profile: builtin
Kernel Version: 6.12.11_1
Operating System: Void Linux
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.569GiB
Name: machine
ID: b84fa389-c9ff-42b0-91af-758a74b846f0
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Additional Info
No response