fork of https://github.com/sourcegraph/zoekt
1load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")
2
3go_library(
4 name = "zoekt-sourcegraph-indexserver_lib",
5 srcs = [
6 "backoff.go",
7 "cleanup.go",
8 "debug.go",
9 "index.go",
10 "index_mutex.go",
11 "main.go",
12 "merge.go",
13 "meta.go",
14 "meta_unix.go",
15 "meta_windows.go",
16 "owner.go",
17 "queue.go",
18 "sg.go",
19 ],
20 embedsrcs = ["default_grpc_service_configuration.json"],
21 importpath = "github.com/sourcegraph/zoekt/cmd/zoekt-sourcegraph-indexserver",
22 visibility = ["//visibility:private"],
23 deps = [
24 "//:zoekt",
25 "//build",
26 "//cmd/zoekt-sourcegraph-indexserver/protos/sourcegraph/zoekt/configuration/v1:configuration",
27 "//ctags",
28 "//debugserver",
29 "//internal/profiler",
30 "@com_github_go_git_go_git_v5//:go-git",
31 "@com_github_grafana_regexp//:regexp",
32 "@com_github_hashicorp_go_retryablehttp//:go-retryablehttp",
33 "@com_github_keegancsmith_tmpfriend//:tmpfriend",
34 "@com_github_peterbourgon_ff_v3//ffcli",
35 "@com_github_prometheus_client_golang//prometheus",
36 "@com_github_prometheus_client_golang//prometheus/promauto",
37 "@com_github_sourcegraph_log//:log",
38 "@com_github_sourcegraph_mountinfo//:mountinfo",
39 "@in_gopkg_natefinch_lumberjack_v2//:lumberjack_v2",
40 "@org_golang_google_grpc//:go_default_library",
41 "@org_golang_google_grpc//credentials/insecure",
42 "@org_golang_google_grpc//metadata",
43 "@org_golang_x_net//trace",
44 "@org_golang_x_sys//unix",
45 "@org_uber_go_atomic//:atomic",
46 "@org_uber_go_automaxprocs//maxprocs",
47 ],
48)
49
50go_binary(
51 name = "zoekt-sourcegraph-indexserver",
52 embed = [":zoekt-sourcegraph-indexserver_lib"],
53 pure = "on",
54 static = "on",
55 visibility = ["//visibility:public"],
56)
57
58go_test(
59 name = "zoekt-sourcegraph-indexserver_test",
60 srcs = [
61 "backoff_test.go",
62 "cleanup_test.go",
63 "index_test.go",
64 "main_test.go",
65 "merge_test.go",
66 "meta_test.go",
67 "owner_test.go",
68 "queue_test.go",
69 "sg_test.go",
70 ],
71 data = glob(["json_schemas/**"]) + ["//testdata:testdata"],
72 embed = [":zoekt-sourcegraph-indexserver_lib"],
73 deps = [
74 "//:zoekt",
75 "//build",
76 "//cmd/zoekt-sourcegraph-indexserver/protos/sourcegraph/zoekt/configuration/v1:configuration",
77 "@com_github_google_go_cmp//cmp",
78 "@com_github_google_go_cmp//cmp/cmpopts",
79 "@com_github_sourcegraph_log//:log",
80 "@com_github_sourcegraph_log//logtest",
81 "@com_github_xeipuuv_gojsonschema//:gojsonschema",
82 "@org_golang_google_grpc//:go_default_library",
83 "@org_golang_google_protobuf//testing/protocmp",
84 "@org_golang_google_protobuf//types/known/timestamppb",
85 ],
86)