Skip to content

Commit

Permalink
fix(build): move BUILD rules next to go code (#5009)
Browse files Browse the repository at this point in the history
  • Loading branch information
justbuchanan committed Aug 2, 2021
1 parent fd30e09 commit 3dc332b
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 58 deletions.
2 changes: 1 addition & 1 deletion kythe/cxx/common/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ shell_tool_test(
scriptfile = "net_client_test_runner.sh",
tools = {
"KYTHE_ENTRYSTREAM": "//kythe/go/platform/tools/entrystream",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools:http_server",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools/http_server",
"KYTHE_WRITE_ENTRIES": "//kythe/go/storage/tools:write_entries",
"KYTHE_WRITE_TABLES": "//kythe/go/serving/tools:write_tables",
},
Expand Down
2 changes: 1 addition & 1 deletion kythe/cxx/common/testdata/start_http_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# "//kythe/go/platform/tools:entrystream",
# "//kythe/go/storage/tools:write_tables",
# "//kythe/go/storage/tools:write_entries",
# "//kythe/go/test/tools:http_server",
# "//kythe/go/test/tools/http_server",

set -e

Expand Down
4 changes: 2 additions & 2 deletions kythe/cxx/indexer/cxx/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,10 @@ sh_test(
data = [
":vname_corpus_entries.entries.gz",
"//kythe/go/platform/tools/entrystream",
"//kythe/go/test/tools:empty_corpus_checker",
"//kythe/go/test/tools/empty_corpus_checker",
],
env = {
"EMPTY_CORPUS_CHECKER": "$(location //kythe/go/test/tools:empty_corpus_checker)",
"EMPTY_CORPUS_CHECKER": "$(location //kythe/go/test/tools/empty_corpus_checker)",
"ENTRYSTREAM": "$(location //kythe/go/platform/tools/entrystream)",
},
)
Expand Down
6 changes: 3 additions & 3 deletions kythe/cxx/tools/fyi/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ shell_tool_test(
tools = {
"FYI": "//kythe/cxx/tools/fyi",
"KYTHE_ENTRYSTREAM": "//kythe/go/platform/tools/entrystream",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools:http_server",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools/http_server",
"KYTHE_WRITE_ENTRIES": "//kythe/go/storage/tools:write_entries",
"KYTHE_WRITE_TABLES": "//kythe/go/serving/tools:write_tables",
},
Expand All @@ -48,7 +48,7 @@ shell_tool_test(
tools = {
"FYI": "//kythe/cxx/tools/fyi",
"KYTHE_ENTRYSTREAM": "//kythe/go/platform/tools/entrystream",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools:http_server",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools/http_server",
"KYTHE_WRITE_ENTRIES": "//kythe/go/storage/tools:write_entries",
"KYTHE_WRITE_TABLES": "//kythe/go/serving/tools:write_tables",
},
Expand All @@ -68,7 +68,7 @@ shell_tool_test(
tools = {
"FYI": "//kythe/cxx/tools/fyi",
"KYTHE_ENTRYSTREAM": "//kythe/go/platform/tools/entrystream",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools:http_server",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools/http_server",
"KYTHE_WRITE_ENTRIES": "//kythe/go/storage/tools:write_entries",
"KYTHE_WRITE_TABLES": "//kythe/go/serving/tools:write_tables",
},
Expand Down
2 changes: 1 addition & 1 deletion kythe/go/serving/tools/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ shell_tool_test(
"JQ": "@com_github_stedolan_jq//:jq",
"KWAZTHIS": "//kythe/go/serving/tools:kwazthis",
"KYTHE_ENTRYSTREAM": "//kythe/go/platform/tools/entrystream",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools:http_server",
"KYTHE_HTTP_SERVER": "//kythe/go/test/tools/http_server",
"KYTHE_WRITE_ENTRIES": "//kythe/go/storage/tools:write_entries",
"KYTHE_WRITE_TABLES": "//kythe/go/serving/tools:write_tables",
},
Expand Down
49 changes: 0 additions & 49 deletions kythe/go/test/tools/BUILD

This file was deleted.

19 changes: 19 additions & 0 deletions kythe/go/test/tools/empty_corpus_checker/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("//tools:build_rules/shims.bzl", "go_binary")

package(default_visibility = ["//kythe:default_visibility"])

go_binary(
name = "empty_corpus_checker",
srcs = ["empty_corpus_checker.go"],
deps = [
"//kythe/go/platform/delimited",
"//kythe/go/storage/entryset",
"//kythe/go/storage/stream",
"//kythe/go/util/flagutil",
"//kythe/go/util/kytheuri",
"//kythe/go/util/schema/facts",
"//kythe/proto:internal_go_proto",
"//kythe/proto:storage_go_proto",
"@org_golang_google_protobuf//proto:go_default_library",
],
)
19 changes: 19 additions & 0 deletions kythe/go/test/tools/http_server/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load("//tools:build_rules/shims.bzl", "go_binary")

package(default_visibility = ["//kythe:default_visibility"])

go_binary(
name = "http_server",
srcs = ["http_server.go"],
deps = [
"//kythe/go/services/filetree",
"//kythe/go/services/graph",
"//kythe/go/services/web",
"//kythe/go/services/xrefs",
"//kythe/go/serving/filetree",
"//kythe/go/serving/graph",
"//kythe/go/serving/xrefs",
"//kythe/go/storage/leveldb",
"//kythe/go/storage/table",
],
)
17 changes: 17 additions & 0 deletions kythe/go/test/tools/xrefs_atomizer/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
load("//tools:build_rules/shims.bzl", "go_binary")

package(default_visibility = ["//kythe:default_visibility"])

go_binary(
name = "xrefs_atomizer",
srcs = ["xrefs_atomizer.go"],
deps = [
"//kythe/go/platform/delimited",
"//kythe/go/services/xrefs",
"//kythe/go/serving/api",
"//kythe/go/test/services/xrefs",
"//kythe/go/util/schema/facts",
"//kythe/proto:storage_go_proto",
"//kythe/proto:xref_go_proto",
],
)
2 changes: 1 addition & 1 deletion tools/build_rules/verifier_test/verifier_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ atomize_entries = rule(
providers = ["kythe_entries"],
),
"_atomizer": attr.label(
default = Label("//kythe/go/test/tools:xrefs_atomizer"),
default = Label("//kythe/go/test/tools/xrefs_atomizer"),
executable = True,
cfg = "host",
),
Expand Down

0 comments on commit 3dc332b

Please sign in to comment.