xenserver / xe-guest-utilities

XenServer guest utilities for unix-like operating systems
BSD 2-Clause "Simplified" License
63 stars 57 forks source link

vendor directory not properly populated #142

Open zhsj opened 1 year ago

zhsj commented 1 year ago

The vendor dir https://github.com/xenserver/xe-guest-utilities/tree/master/vendor only has modules.txt files, without the vendor sources.

This makes plain go command fail to operate.

$ go build -o build/xenstore ./xenstore
go: finding module for package golang.org/x/sys/unix
xenstore/xenstore.go:11:2: cannot query module due to -mod=vendor
        (Go version in go.mod is at least 1.14 and vendor directory exists.)

Either removing the vendor/modules.txt file or keeping all vendor files will make go command happy.

$ rm -r vendor/
$ go build -o build/xenstore ./xenstore
$ go mod vendor
$ ls vendor/golang.org/x/sys/
AUTHORS  CONTRIBUTORS  internal  LICENSE  PATENTS  unix
$ go build -o build/xenstore ./xenstore