/ go Public
cmd/go: does not vendor some directories #59182
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
go mod vendorthe package gitlab.com/gomidi/midi results in a critical
cpp/cgo directory being deleted in its entirety.
What did you expect to see?
Complete vendoring and successful cgo compilation.
What did you see instead?
I tried several recommended tricks to force
go mod vendorto persist the directory, to no avail. I tried:
dummy.gofile to the
cpp/directory (the most commonly recommended tip from the Go community).
cpp/*to a parent directory with existing
*.gofiles, and updating
#includedirectives to account for the new locations.
*.gofiles (another Go community recommended tip).
The only states I am have been able to achieve are:
go mod vendordeletes the
go install ./...complains of missing C/C++ declarations
go install ./...complains of duplicate C/C++ declarations
Can someone please explain what the gomidi/midi author should do to correct their
go mod vendorintegration in their CGO code?
As a workaround, I am currently using modvendor, but if at all possible, I would prefer to use only built-in go tools.
Frankly, the whole go vendoring system behaves awkwardly with cgo (above), with
go install <dev tools>(no dev dependency tracking in
go.mod), and with reflection (e.g. enum comparison). I am at a loss to explain why the different built-in Go components often fail to cooperate with each other.
The text was updated successfully, but these errors were encountered: