load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load(
    "@bazel_gazelle//:def.bzl",
    "gazelle",
)

# gazelle:prefix github.com/google/go-jsonnet
gazelle(
    name = "gazelle",
)

go_library(
    name = "go_default_library",
    srcs = [
        "builtins.go",
        "doc.go",
        "error_formatter.go",
        "imports.go",
        "interpreter.go",
        "runtime_error.go",
        "thunks.go",
        "util.go",
        "value.go",
        "vm.go",
    ],
    importpath = "github.com/google/go-jsonnet",
    visibility = ["//visibility:public"],
    deps = [
        "//ast:go_default_library",
        "//astgen:go_default_library",
        "//internal/errors:go_default_library",
        "//internal/parser:go_default_library",
        "//internal/program:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "builtins_benchmark_test.go",
        "interpreter_test.go",
        "jsonnet_test.go",
        "main_test.go",
    ],
    data = glob(["testdata/**"]),
    embed = [":go_default_library"],
    deps = [
        "//ast:go_default_library",
        "//internal/parser:go_default_library",
        "//internal/testutils:go_default_library",
    ],
)
