Skip to content

Commit

Permalink
Update the proto, go, and c++ packages (#302)
Browse files Browse the repository at this point in the history
Fix the proto, go, and c++ packages
  • Loading branch information
Alfus authored Aug 3, 2023
1 parent 63e9180 commit ed066e3
Show file tree
Hide file tree
Showing 15 changed files with 2,365 additions and 3 deletions.
6 changes: 3 additions & 3 deletions proto/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ version: v1
deps:
- buf.build/googleapis/googleapis
build:
excludes: [test]
excludes: [test, dev]
lint:
ignore:
- dev/cel/expr/conformance/proto2/test_all_types.proto
- dev/cel/expr/conformance/proto3/test_all_types.proto
- cel/expr/conformance/proto2/test_all_types.proto
- cel/expr/conformance/proto3/test_all_types.proto
except:
- PACKAGE_VERSION_SUFFIX
- ENUM_VALUE_PREFIX
208 changes: 208 additions & 0 deletions proto/cel/expr/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################

proto_library(
name = "expr_proto",
srcs = [
"checked.proto",
"eval.proto",
"explain.proto",
"syntax.proto",
"value.proto",
],
strip_import_prefix = "/proto",
deps = [
"@com_google_googleapis//google/rpc:status_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

proto_library(
name = "syntax_proto",
srcs = [
"syntax.proto",
],
strip_import_prefix = "/proto",
deps = [
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

proto_library(
name = "checked_proto",
srcs = [
"checked.proto",
],
strip_import_prefix = "/proto",
deps = [
":syntax_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:struct_proto",
],
)

proto_library(
name = "value_proto",
srcs = [
"value.proto",
],
strip_import_prefix = "/proto",
deps = [
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:struct_proto",
],
)

proto_library(
name = "eval_proto",
srcs = [
"eval.proto",
],
strip_import_prefix = "/proto",
deps = [
":value_proto",
"@com_google_googleapis//google/rpc:status_proto",
],
)

proto_library(
name = "explain_proto",
srcs = [
"explain.proto",
],
strip_import_prefix = "/proto",
deps = [
":value_proto",
],
)

##############################################################################
# Java
##############################################################################
java_proto_library(
name = "expr_java_proto",
deps = [":expr_proto"],
)

java_proto_library(
name = "syntax_java_proto",
deps = [":syntax_proto"],
)

java_proto_library(
name = "checked_java_proto",
deps = [":checked_proto"],
)

java_proto_library(
name = "value_java_proto",
deps = [":value_proto"],
)

java_proto_library(
name = "eval_java_proto",
deps = [":eval_proto"],
)

java_proto_library(
name = "explain_java_proto",
deps = [":explain_proto"],
)

###############################################################################
## Go
###############################################################################

load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

go_proto_library(
name = "google_rpc_status_go_proto",
importpath = "google.golang.org/genproto/googleapis/rpc/status",
protos = ["@com_google_googleapis//google/rpc:status_proto"],
)

go_proto_library(
name = "expr_go_proto",
importpath = "cel.dev/expr",
protos = [":expr_proto"],
deps = [
":google_rpc_status_go_proto",
],
)

go_proto_library(
name = "syntax_go_proto",
importpath = "cel.dev/expr",
protos = [":syntax_proto"],
)

go_proto_library(
name = "checked_go_proto",
embed = [":syntax_go_proto"],
importpath = "cel.dev/expr",
protos = [":checked_proto"],
)

go_proto_library(
name = "value_go_proto",
importpath = "cel.dev/expr",
protos = [":value_proto"],
)

go_proto_library(
name = "eval_go_proto",
embed = [":value_go_proto"],
importpath = "cel.dev/expr",
protos = [":eval_proto"],
deps = [
":google_rpc_status_go_proto",
],
)

go_proto_library(
name = "explain_go_proto",
embed = [":value_go_proto"],
importpath = "cel.dev/expr",
protos = [":explain_proto"],
)

###############################################################################
## C++
###############################################################################

# Note: cc_proto_library cannot generate a target for expr_proto due to the subtargets
# defined below

cc_proto_library(
name = "syntax_cc_proto",
deps = [":syntax_proto"],
)

cc_proto_library(
name = "checked_cc_proto",
deps = [":checked_proto"],
)

cc_proto_library(
name = "value_cc_proto",
deps = [":value_proto"],
)

cc_proto_library(
name = "eval_cc_proto",
deps = [":eval_proto"],
)

cc_proto_library(
name = "explain_cc_proto",
deps = [":explain_proto"],
)
Loading

0 comments on commit ed066e3

Please sign in to comment.