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

package(
    default_visibility = ["//visibility:public"],
    licenses = ["notice"],  # Apache 2.0
)

go_library(
    name = "go_default_library",
    srcs = [
        "activation.go",
        "attributes.go",
        "attribute_patterns.go",
        "decorators.go",
        "dispatcher.go",
        "evalstate.go",
        "interpretable.go",
        "interpreter.go",
        "planner.go",
        "prune.go",
    ],
      importpath = "github.com/google/cel-go/interpreter",
    deps = [
        "//common:go_default_library",
        "//common/operators:go_default_library",
        "//common/overloads:go_default_library",
        "//common/packages:go_default_library",
        "//common/types:go_default_library",
        "//common/types/ref:go_default_library",
        "//common/types/traits:go_default_library",
        "//interpreter/functions:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
        "@io_bazel_rules_go//proto/wkt:struct_go_proto",
        "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
        "@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
        "@org_golang_google_genproto//googleapis/api/expr/v1alpha1:go_default_library",
    ]
)

go_test(
    name = "go_default_test",
    srcs = [
        "activation_test.go",
        "attributes_test.go",
        "attribute_patterns_test.go",
        "interpreter_test.go",
        "prune_test.go",
    ],
    embed = [
        ":go_default_library",
    ],
    deps = [
        "//checker:go_default_library",
        "//checker/decls:go_default_library",
        "//common/debug:go_default_library",
        "//common/operators:go_default_library",
        "//common/packages:go_default_library",
        "//common/types:go_default_library",
        "//interpreter/functions:go_default_library",
        "//parser:go_default_library",
        "//test:go_default_library",
        "//test/proto2pb:go_default_library",
        "//test/proto3pb:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_golang_protobuf//ptypes:go_default_library",
        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
        "@io_bazel_rules_go//proto/wkt:struct_go_proto",
        "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
        "@org_golang_google_genproto//googleapis/api/expr/v1alpha1:go_default_library",
    ],
)
