Skip to content

Vendoring breaks build #116

@ben

Description

@ben

Using this example program:

package main

import (
	"fmt"
	v8 "github.com/tommie/v8go"
)

func main() {
	ctx := v8.NewContext()
	val, _ := ctx.RunScript("3 + 4", "value.js")           
	fmt.Printf("addition result: %s\n", val)
}

This builds and runs, but if you go mod vendor, the build breaks because some files are missing:

❯ go run .     
addition result: 7

❯ go mod vendor

❯ go run .
# github.com/tommie/v8go
context.cc:1:10: fatal error: 'deps/include/v8-template.h' file not found

I can work around this by always doing this after I vendor, but it'd be nice if everyone else on my team didn't have to do that:

cp -r $(go env GOMODCACHE)/github.com/tommie/v8go@v0.34.0/deps/include vendor/github.com/tommie/v8go/deps/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions