load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "sem", srcs = [ "config_sem.go", "restricted_hint.go", "restricted_statement.go", "sem.go", "strict_sem.go", ], importpath = "github.com/pingcap/tidb/pkg/util/sem", visibility = ["//visibility:public"], deps = [ "//pkg/config", "//pkg/keyspace", "//pkg/parser/ast", "//pkg/parser/mysql", "//pkg/sessionctx/variable", "//pkg/util/dbterror", "//pkg/util/intest", "//pkg/util/logutil", "@com_github_pingcap_errors//:errors", "@com_github_pingcap_failpoint//:failpoint", "@org_uber_go_zap//:zap", ], ) go_test( name = "sem_test", timeout = "short", srcs = [ "main_test.go", "restricted_statement_test.go", "sem_test.go", ], embed = [":sem"], flaky = True, deps = [ "//pkg/config", "//pkg/parser", "//pkg/parser/ast", "//pkg/parser/mysql", "//pkg/sessionctx/variable", "//pkg/testkit/testsetup", "@com_github_stretchr_testify//assert", "@org_uber_go_goleak//:goleak", ], )