-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
This project doesn't work when vendored.
To reproduce
# Create a go project
mkdir go-libsql-vendor-bug
cd go-libsql-vendor-bug
go mod init go-libsql-vendor-bug
# Write a main file
cat << EOF >> main.go
package main
import (
_ "github.com/tursodatabase/go-libsql"
)
func main() {
}
EOF
# Vendor
go mod tidy
go mod vendor
# Try to build (Will fail)
go build .
Error
# github.com/tursodatabase/go-libsql
vendor/github.com/tursodatabase/go-libsql/libsql.go:16:10: fatal error: libsql.h: No such file or directory
16 | #include <libsql.h>
| ^~~~~~~~~~
(may be related to #21)
Workaround
One may manually copy the content of the lib
directory to fix the compilation issue. However, go mod vendor
will always delete the workaround.
Metadata
Metadata
Assignees
Labels
No labels