blob: e34ae51bc4e88b896bed3c56238d9a3de3b3b396 [file] [log] [blame]
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc_buf//:defs.bzl", "buf_proto_lint_test")
buf_proto_lint_test(
name = "common_proto_lint_test",
except_rules = [
"PACKAGE_VERSION_SUFFIX",
"ENUM_VALUE_PREFIX", # TODO: evaluate correctness
"ENUM_ZERO_VALUE_SUFFIX", # TODO: evaluate correctness
"FIELD_LOWER_SNAKE_CASE", # TODO: evaluate correctness
],
protos = [":common_proto"],
use_rules = [
"DEFAULT",
"COMMENTS",
],
)
proto_library(
name = "common_proto",
srcs = ["common.proto"],
visibility = ["//metropolis:__subpackages__"],
deps = [
"//osbase/logtree/proto:proto_proto",
"//version/spec:spec_proto",
"@protobuf//:timestamp_proto",
],
)
go_proto_library(
name = "common_go_proto",
importpath = "source.monogon.dev/metropolis/proto/common",
proto = ":common_proto",
visibility = ["//metropolis:__subpackages__"],
deps = [
"//osbase/logtree/proto",
"//version/spec",
],
)
go_library(
name = "common",
embed = [":common_go_proto"],
importpath = "source.monogon.dev/metropolis/proto/common",
visibility = ["//visibility:public"],
)