Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work when vendored #57

Open
jcornaz opened this issue Jan 27, 2025 · 0 comments
Open

Doesn't work when vendored #57

jcornaz opened this issue Jan 27, 2025 · 0 comments

Comments

@jcornaz
Copy link

jcornaz commented Jan 27, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant