Skip to content

Commit 1af547e

Browse files
dynamic modules: add abi.h to go mod vendor tree (#44395)
Commit Message: add abi.h to go mod vendor tree Additional Description: go mod vendor is a common way in Golang to import modules/packages. It works by downloading and storing the locked version of a dependency in a vendor directory within the module. Vendoring skips downloading and storing all directories that do not have Go source files. This is a problem because the Go dynamic modules SDK uses a CGO preamble with an import of this header file, but this header is missing from the vendor download. This change adds a dummy Go file that will make Go treat this directory as a valid Go package and thus let it be imported so the header will exist properly. Risk Level: none Testing: n/a Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a --------- Signed-off-by: Adam Anderson <6754028+AdamEAnderson@users.noreply.github.com>
1 parent 80bf54a commit 1af547e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • source/extensions/dynamic_modules/abi
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Package abi contains the C ABI header for Envoy dynamic modules.
2+
//
3+
// This file exists so that `go mod vendor` includes this directory.
4+
// Without a .go file, the Go toolchain skips this directory during
5+
// vendoring, which causes the abi.h header (needed by the Go SDK's
6+
// cgo include) to be missing from the vendor tree.
7+
package abi

0 commit comments

Comments
 (0)