From e3493fe05ac248a7144fe6a22d26e5b7199a3dd3 Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Tue, 23 Nov 2021 08:49:59 -0500 Subject: [PATCH] cleanup: use script to update external/googleapis (#7650) Use a script to update the list of `.proto` files use by each library, as well as the list of libraries each library depends on. The more complicated case was the `google-cloud-cpp::logging_type_protos` library, its name does not match the Bazel rules where it would generate `*logging_type_type_protos`. I introduced an `INTERFACE` library for backwards compatibility. In the bigquery library we are exposing both the `v1beta1/` and `v1/` versions of `connection.proto`. I will figure out how to clean that up in a future PR. --- ci/cloudbuild/builds/cmake-install.sh | 3 + cmake/CompileProtos.cmake | 2 +- external/googleapis/CMakeLists.txt | 390 +++++------------- external/googleapis/protodeps/bigquery.deps | 10 + external/googleapis/protodeps/bigtable.deps | 11 + external/googleapis/protodeps/dialogflow.deps | 8 + external/googleapis/protodeps/iam.deps | 9 + external/googleapis/protodeps/logging.deps | 12 + .../googleapis/protodeps/logging_type.deps | 2 + external/googleapis/protodeps/monitoring.deps | 13 + external/googleapis/protodeps/pubsub.deps | 5 + external/googleapis/protodeps/spanner.deps | 11 + external/googleapis/protodeps/speech.deps | 6 + external/googleapis/protodeps/storage.deps | 10 + .../googleapis/protodeps/texttospeech.deps | 6 +- external/googleapis/protolists/bigquery.list | 16 + external/googleapis/protolists/bigtable.list | 7 + .../googleapis/protolists/dialogflow.list | 21 + external/googleapis/protolists/iam.list | 4 + external/googleapis/protolists/logging.list | 4 + .../googleapis/protolists/logging_type.list | 2 + .../googleapis/protolists/monitoring.list | 17 + external/googleapis/protolists/pubsub.list | 2 + external/googleapis/protolists/spanner.list | 12 + external/googleapis/protolists/speech.list | 1 + external/googleapis/protolists/storage.list | 1 + external/googleapis/update_libraries.sh | 51 ++- 27 files changed, 337 insertions(+), 299 deletions(-) create mode 100644 external/googleapis/protodeps/bigquery.deps create mode 100644 external/googleapis/protodeps/bigtable.deps create mode 100644 external/googleapis/protodeps/dialogflow.deps create mode 100644 external/googleapis/protodeps/iam.deps create mode 100644 external/googleapis/protodeps/logging.deps create mode 100644 external/googleapis/protodeps/logging_type.deps create mode 100644 external/googleapis/protodeps/monitoring.deps create mode 100644 external/googleapis/protodeps/pubsub.deps create mode 100644 external/googleapis/protodeps/spanner.deps create mode 100644 external/googleapis/protodeps/speech.deps create mode 100644 external/googleapis/protodeps/storage.deps create mode 100644 external/googleapis/protolists/bigquery.list create mode 100644 external/googleapis/protolists/bigtable.list create mode 100644 external/googleapis/protolists/dialogflow.list create mode 100644 external/googleapis/protolists/iam.list create mode 100644 external/googleapis/protolists/logging.list create mode 100644 external/googleapis/protolists/logging_type.list create mode 100644 external/googleapis/protolists/monitoring.list create mode 100644 external/googleapis/protolists/pubsub.list create mode 100644 external/googleapis/protolists/spanner.list create mode 100644 external/googleapis/protolists/speech.list create mode 100644 external/googleapis/protolists/storage.list diff --git a/ci/cloudbuild/builds/cmake-install.sh b/ci/cloudbuild/builds/cmake-install.sh index 20116a80ba49c..9843ed5ca7e65 100755 --- a/ci/cloudbuild/builds/cmake-install.sh +++ b/ci/cloudbuild/builds/cmake-install.sh @@ -53,11 +53,14 @@ expected_dirs+=( ./include/google/api ./include/google/bigtable/v2 ./include/google/cloud/bigquery/connection + ./include/google/cloud/bigquery/connection/v1 ./include/google/cloud/bigquery/connection/v1beta1 ./include/google/cloud/bigquery/datatransfer ./include/google/cloud/bigquery/datatransfer/v1 ./include/google/cloud/bigquery/logging ./include/google/cloud/bigquery/logging/v1 + ./include/google/cloud/bigquery/reservation + ./include/google/cloud/bigquery/reservation/v1 ./include/google/cloud/bigquery/v2 ./include/google/cloud/bigtable/internal ./include/google/cloud/dialogflow diff --git a/cmake/CompileProtos.cmake b/cmake/CompileProtos.cmake index d1ba1427b2367..02afc781115c0 100644 --- a/cmake/CompileProtos.cmake +++ b/cmake/CompileProtos.cmake @@ -330,7 +330,7 @@ macro (external_googleapis_install_pc_common target) # Examine the target LINK_LIBRARIES property, use that to pull the # dependencies between the google-cloud-cpp::* libraries. set(_target_pc_requires) - get_target_property(_target_deps ${target} LINK_LIBRARIES) + get_target_property(_target_deps ${target} INTERFACE_LINK_LIBRARIES) foreach (dep ${_target_deps}) if ("${dep}" MATCHES "^google-cloud-cpp::") string(REPLACE "google-cloud-cpp::" "google_cloud_cpp_" dep diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt index 676948c3d3180..00bcebb35cad5 100644 --- a/external/googleapis/CMakeLists.txt +++ b/external/googleapis/CMakeLists.txt @@ -39,36 +39,7 @@ set(EXTERNAL_GOOGLEAPIS_PROTO_FILES "google/devtools/cloudtrace/v2/tracing.proto" "google/rpc/error_details.proto" "google/rpc/status.proto" - "google/iam/admin/v1/iam.proto" - "google/iam/admin/v1/audit_data.proto" - "google/iam/credentials/v1/common.proto" - "google/iam/credentials/v1/iamcredentials.proto" - "google/iam/v1/options.proto" - "google/iam/v1/policy.proto" - "google/iam/v1/iam_policy.proto" - "google/longrunning/operations.proto" - "google/bigtable/admin/v2/bigtable_instance_admin.proto" - "google/bigtable/admin/v2/bigtable_table_admin.proto" - "google/bigtable/admin/v2/common.proto" - "google/bigtable/admin/v2/instance.proto" - "google/bigtable/admin/v2/table.proto" - "google/bigtable/v2/bigtable.proto" - "google/bigtable/v2/data.proto" "google/cloud/bigquery/connection/v1beta1/connection.proto" - "google/cloud/bigquery/datatransfer/v1/datatransfer.proto" - "google/cloud/bigquery/datatransfer/v1/transfer.proto" - "google/cloud/bigquery/logging/v1/audit_data.proto" - "google/cloud/bigquery/storage/v1/arrow.proto" - "google/cloud/bigquery/storage/v1/avro.proto" - "google/cloud/bigquery/storage/v1/protobuf.proto" - "google/cloud/bigquery/storage/v1/storage.proto" - "google/cloud/bigquery/storage/v1/stream.proto" - "google/cloud/bigquery/storage/v1/table.proto" - "google/cloud/bigquery/v2/encryption_config.proto" - "google/cloud/bigquery/v2/model.proto" - "google/cloud/bigquery/v2/model_reference.proto" - "google/cloud/bigquery/v2/standard_sql.proto" - "google/cloud/bigquery/v2/table_reference.proto" "google/cloud/dialogflow/v2beta1/agent.proto" "google/cloud/dialogflow/v2beta1/audio_config.proto" "google/cloud/dialogflow/v2beta1/context.proto" @@ -83,55 +54,10 @@ set(EXTERNAL_GOOGLEAPIS_PROTO_FILES "google/cloud/dialogflow/v2beta1/session_entity_type.proto" "google/cloud/dialogflow/v2beta1/validation_result.proto" "google/cloud/dialogflow/v2beta1/webhook.proto" - "google/cloud/dialogflow/v2/agent.proto" - "google/cloud/dialogflow/v2/audio_config.proto" - "google/cloud/dialogflow/v2/context.proto" - "google/cloud/dialogflow/v2/fulfillment.proto" - "google/cloud/dialogflow/v2/entity_type.proto" - "google/cloud/dialogflow/v2/environment.proto" - "google/cloud/dialogflow/v2/intent.proto" - "google/cloud/dialogflow/v2/session.proto" - "google/cloud/dialogflow/v2/session_entity_type.proto" - "google/cloud/dialogflow/v2/validation_result.proto" - "google/cloud/dialogflow/v2/webhook.proto" - "google/cloud/speech/v1/cloud_speech.proto" - "google/logging/type/http_request.proto" - "google/logging/type/log_severity.proto" - "google/logging/v2/log_entry.proto" - "google/logging/v2/logging.proto" - "google/logging/v2/logging_config.proto" - "google/logging/v2/logging_metrics.proto" - "google/monitoring/v3/alert.proto" - "google/monitoring/v3/alert_service.proto" - "google/monitoring/v3/common.proto" - "google/monitoring/v3/dropped_labels.proto" - "google/monitoring/v3/group.proto" - "google/monitoring/v3/group_service.proto" - "google/monitoring/v3/metric.proto" - "google/monitoring/v3/metric_service.proto" - "google/monitoring/v3/mutation_record.proto" - "google/monitoring/v3/notification.proto" - "google/monitoring/v3/notification_service.proto" - "google/monitoring/v3/service.proto" - "google/monitoring/v3/service_service.proto" - "google/monitoring/v3/span_context.proto" - "google/monitoring/v3/uptime.proto" - "google/monitoring/v3/uptime_service.proto" - "google/pubsub/v1/pubsub.proto" - "google/pubsub/v1/schema.proto" - "google/spanner/admin/database/v1/backup.proto" - "google/spanner/admin/database/v1/common.proto" - "google/spanner/admin/database/v1/spanner_database_admin.proto" - "google/spanner/admin/instance/v1/spanner_instance_admin.proto" - "google/spanner/v1/commit_response.proto" - "google/spanner/v1/keys.proto" - "google/spanner/v1/mutation.proto" - "google/spanner/v1/query_plan.proto" - "google/spanner/v1/result_set.proto" - "google/spanner/v1/spanner.proto" - "google/spanner/v1/transaction.proto" - "google/spanner/v1/type.proto" - "google/storage/v2/storage.proto" + "google/iam/v1/options.proto" + "google/iam/v1/policy.proto" + "google/iam/v1/iam_policy.proto" + "google/longrunning/operations.proto" "google/type/calendar_period.proto" "google/type/color.proto" "google/type/date.proto" @@ -317,7 +243,6 @@ set(external_googleapis_installed_libraries_list google_cloud_cpp_api_resource_protos google_cloud_cpp_devtools_cloudtrace_v2_trace_protos google_cloud_cpp_devtools_cloudtrace_v2_tracing_protos - google_cloud_cpp_logging_type_protos google_cloud_cpp_logging_protos google_cloud_cpp_monitoring_protos google_cloud_cpp_iam_v1_options_protos @@ -403,93 +328,42 @@ external_googleapis_add_library( devtools_cloudtrace_v2_trace_protos api_annotations_protos api_client_protos api_field_behavior_protos rpc_status_protos) +google_cloud_cpp_load_protolist(cloud_bigquery_list "protolists/bigquery.list") +google_cloud_cpp_load_protodeps(cloud_bigquery_deps "protodeps/bigquery.deps") google_cloud_cpp_grpcpp_library( google_cloud_cpp_cloud_bigquery_protos + ${cloud_bigquery_list} "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/connection/v1beta1/connection.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/datatransfer/v1/datatransfer.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/datatransfer/v1/transfer.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/logging/v1/audit_data.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/storage/v1/arrow.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/storage/v1/avro.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/storage/v1/protobuf.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/storage/v1/storage.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/storage/v1/stream.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/storage/v1/table.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/v2/encryption_config.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/v2/model.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/v2/model_reference.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/v2/standard_sql.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/bigquery/v2/table_reference.proto" PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(cloud_bigquery_protos) -target_link_libraries( - google_cloud_cpp_cloud_bigquery_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::iam_v1_iam_policy_protos - google-cloud-cpp::iam_v1_policy_protos - google-cloud-cpp::rpc_status_protos - google-cloud-cpp::api_http_protos) +target_link_libraries(google_cloud_cpp_cloud_bigquery_protos + PUBLIC ${cloud_bigquery_deps}) +google_cloud_cpp_load_protolist(bigtable_list "protolists/bigtable.list") +google_cloud_cpp_load_protodeps(bigtable_deps "protodeps/bigtable.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_bigtable_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/admin/v2/bigtable_instance_admin.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/admin/v2/bigtable_table_admin.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/admin/v2/common.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/admin/v2/instance.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/admin/v2/table.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/v2/bigtable.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/bigtable/v2/data.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" - "${PROTO_INCLUDE_DIR}") + google_cloud_cpp_bigtable_protos ${bigtable_list} PROTO_PATH_DIRECTORIES + "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(bigtable_protos) -target_link_libraries( - google_cloud_cpp_bigtable_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::iam_v1_iam_policy_protos - google-cloud-cpp::iam_v1_policy_protos - google-cloud-cpp::longrunning_operations_protos - google-cloud-cpp::rpc_status_protos - google-cloud-cpp::api_auth_protos) +target_link_libraries(google_cloud_cpp_bigtable_protos PUBLIC ${bigtable_deps}) # TODO(#5660) - protobuf + gcc<6 + deprecated enums do not compile if (NOT (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0))) + google_cloud_cpp_load_protolist(cloud_dialogflow_v2_list + "protolists/dialogflow.list") + google_cloud_cpp_load_protodeps(cloud_dialogflow_v2_deps + "protodeps/dialogflow.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_cloud_dialogflow_v2_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/agent.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/audio_config.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/context.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/fulfillment.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/entity_type.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/environment.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/intent.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/session.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/session_entity_type.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/validation_result.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/dialogflow/v2/webhook.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" + google_cloud_cpp_cloud_dialogflow_v2_protos ${cloud_dialogflow_v2_list} + PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(cloud_dialogflow_v2_protos) - target_link_libraries( - google_cloud_cpp_cloud_dialogflow_v2_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::longrunning_operations_protos - google-cloud-cpp::rpc_status_protos - google-cloud-cpp::type_latlng_protos) + target_link_libraries(google_cloud_cpp_cloud_dialogflow_v2_protos + PUBLIC ${cloud_dialogflow_v2_deps}) google_cloud_cpp_grpcpp_library( google_cloud_cpp_cloud_dialogflow_v2beta1_protos @@ -526,20 +400,15 @@ if (NOT (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") google_cloud_cpp_cloud_dialogflow_v2beta1_protos) endif () +google_cloud_cpp_load_protolist(cloud_speech_list "protolists/speech.list") +google_cloud_cpp_load_protodeps(cloud_speech_deps "protodeps/speech.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_cloud_speech_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/cloud/speech/v1/cloud_speech.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" + google_cloud_cpp_cloud_speech_protos ${cloud_speech_list} + PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(cloud_speech_protos) -target_link_libraries( - google_cloud_cpp_cloud_speech_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::longrunning_operations_protos - google-cloud-cpp::rpc_status_protos) +target_link_libraries(google_cloud_cpp_cloud_speech_protos + PUBLIC ${cloud_speech_deps}) google_cloud_cpp_load_protolist(cloud_texttospeech_list "protolists/texttospeech.list") @@ -553,157 +422,74 @@ external_googleapis_set_version_and_alias(cloud_texttospeech_protos) target_link_libraries(google_cloud_cpp_cloud_texttospeech_protos PUBLIC ${cloud_texttospeech_deps}) +google_cloud_cpp_load_protolist(iam_list "protolists/iam.list") +google_cloud_cpp_load_protodeps(iam_deps "protodeps/iam.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_iam_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/v1/options.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/v1/policy.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/v1/iam_policy.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/admin/v1/iam.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/admin/v1/audit_data.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/credentials/v1/iamcredentials.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/iam/credentials/v1/common.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" - "${PROTO_INCLUDE_DIR}") + google_cloud_cpp_iam_protos ${iam_list} PROTO_PATH_DIRECTORIES + "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(iam_protos) -target_link_libraries( - google_cloud_cpp_iam_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::type_expr_protos) +target_link_libraries(google_cloud_cpp_iam_protos PUBLIC ${iam_deps}) +google_cloud_cpp_load_protolist(logging_type_list + "protolists/logging_type.list") +google_cloud_cpp_load_protodeps(logging_type_deps "protodeps/logging_type.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_logging_type_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/logging/type/http_request.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/logging/type/log_severity.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" + google_cloud_cpp_logging_type_type_protos ${logging_type_list} + PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") -external_googleapis_set_version_and_alias(logging_type_protos) -target_link_libraries(google_cloud_cpp_logging_type_protos - PUBLIC google-cloud-cpp::api_annotations_protos) +external_googleapis_set_version_and_alias(logging_type_type_protos) +target_link_libraries(google_cloud_cpp_logging_type_type_protos + PUBLIC ${logging_type_deps}) +google_cloud_cpp_load_protolist(logging_list "protolists/logging.list") +google_cloud_cpp_load_protodeps(logging_deps "protodeps/logging.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_logging_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/logging/v2/log_entry.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/logging/v2/logging.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/logging/v2/logging_config.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/logging/v2/logging_metrics.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" - "${PROTO_INCLUDE_DIR}") + google_cloud_cpp_logging_protos ${logging_list} PROTO_PATH_DIRECTORIES + "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(logging_protos) -target_link_libraries( - google_cloud_cpp_logging_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_distribution_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_metric_protos - google-cloud-cpp::api_monitored_resource_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::logging_type_protos - google-cloud-cpp::rpc_status_protos) +target_link_libraries(google_cloud_cpp_logging_protos PUBLIC ${logging_deps}) +# This is just for backwards compatibility. +add_library(google_cloud_cpp_logging_type_protos INTERFACE) +set_target_properties( + "google_cloud_cpp_logging_type_protos" + PROPERTIES EXPORT_NAME google-cloud-cpp::logging_type_protos) +target_link_libraries(google_cloud_cpp_logging_type_protos + INTERFACE google-cloud-cpp::logging_type_type_protos) + +google_cloud_cpp_load_protolist(monitoring_list "protolists/monitoring.list") +google_cloud_cpp_load_protodeps(monitoring_deps "protodeps/monitoring.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_monitoring_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/alert.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/alert_service.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/common.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/dropped_labels.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/group.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/group_service.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/metric.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/metric_service.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/mutation_record.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/notification.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/notification_service.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/service.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/service_service.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/span_context.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/uptime.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/monitoring/v3/uptime_service.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" + google_cloud_cpp_monitoring_protos ${monitoring_list} + PROTO_PATH_DIRECTORIES "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(monitoring_protos) -target_link_libraries( - google_cloud_cpp_monitoring_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_distribution_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_label_protos - google-cloud-cpp::api_launch_stage_protos - google-cloud-cpp::api_metric_protos - google-cloud-cpp::api_monitored_resource_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::longrunning_operations_protos - google-cloud-cpp::rpc_status_protos - google-cloud-cpp::type_calendar_period_protos) +target_link_libraries(google_cloud_cpp_monitoring_protos + PUBLIC ${monitoring_deps}) +google_cloud_cpp_load_protolist(pubsub_list "protolists/pubsub.list") +google_cloud_cpp_load_protodeps(pubsub_deps "protodeps/pubsub.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_pubsub_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/pubsub/v1/pubsub.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/pubsub/v1/schema.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" - "${PROTO_INCLUDE_DIR}") + google_cloud_cpp_pubsub_protos ${pubsub_list} PROTO_PATH_DIRECTORIES + "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(pubsub_protos) -target_link_libraries( - google_cloud_cpp_pubsub_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::rpc_status_protos) +target_link_libraries(google_cloud_cpp_pubsub_protos PUBLIC ${pubsub_deps}) +google_cloud_cpp_load_protolist(spanner_list "protolists/spanner.list") +google_cloud_cpp_load_protodeps(spanner_deps "protodeps/spanner.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_spanner_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/admin/database/v1/backup.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/admin/database/v1/common.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/admin/database/v1/spanner_database_admin.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/admin/instance/v1/spanner_instance_admin.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/commit_response.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/keys.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/mutation.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/query_plan.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/result_set.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/spanner.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/transaction.proto" - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/spanner/v1/type.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" - "${PROTO_INCLUDE_DIR}") + google_cloud_cpp_spanner_protos ${spanner_list} PROTO_PATH_DIRECTORIES + "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(spanner_protos) -target_link_libraries( - google_cloud_cpp_spanner_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::api_resource_protos - google-cloud-cpp::iam_v1_iam_policy_protos - google-cloud-cpp::iam_v1_policy_protos - google-cloud-cpp::longrunning_operations_protos - google-cloud-cpp::rpc_status_protos) +target_link_libraries(google_cloud_cpp_spanner_protos PUBLIC ${spanner_deps}) +google_cloud_cpp_load_protolist(storage_list "protolists/storage.list") +google_cloud_cpp_load_protodeps(storage_deps "protodeps/storage.deps") google_cloud_cpp_grpcpp_library( - google_cloud_cpp_storage_protos - "${EXTERNAL_GOOGLEAPIS_SOURCE}/google/storage/v2/storage.proto" - PROTO_PATH_DIRECTORIES - "${EXTERNAL_GOOGLEAPIS_SOURCE}" - "${PROTO_INCLUDE_DIR}") + google_cloud_cpp_storage_protos ${storage_list} PROTO_PATH_DIRECTORIES + "${EXTERNAL_GOOGLEAPIS_SOURCE}" "${PROTO_INCLUDE_DIR}") external_googleapis_set_version_and_alias(storage_protos) -target_link_libraries( - google_cloud_cpp_storage_protos - PUBLIC google-cloud-cpp::api_annotations_protos - google-cloud-cpp::api_client_protos - google-cloud-cpp::api_field_behavior_protos - google-cloud-cpp::type_date_protos - google-cloud-cpp::iam_v1_iam_policy_protos - google-cloud-cpp::iam_v1_policy_protos) +target_link_libraries(google_cloud_cpp_storage_protos PUBLIC ${storage_deps}) # Install the libraries and headers in the locations determined by # GNUInstallDirs @@ -711,6 +497,8 @@ include(GNUInstallDirs) install( TARGETS ${external_googleapis_installed_libraries_list} + google_cloud_cpp_logging_type_type_protos + google_cloud_cpp_logging_type_protos EXPORT googleapis-targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT google_cloud_cpp_runtime @@ -723,26 +511,46 @@ install( # duplication). install( TARGETS ${external_googleapis_installed_libraries_list} + google_cloud_cpp_logging_type_type_protos + google_cloud_cpp_logging_type_protos LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT google_cloud_cpp_development NAMELINK_ONLY ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT google_cloud_cpp_development) -foreach (target ${external_googleapis_installed_libraries_list}) +foreach (target ${external_googleapis_installed_libraries_list} + google_cloud_cpp_logging_type_type_protos) google_cloud_cpp_install_proto_library_headers("${target}") google_cloud_cpp_install_proto_library_protos( "${target}" "${EXTERNAL_GOOGLEAPIS_SOURCE}") endforeach () # Create and install the pkg-config files. -foreach (target ${external_googleapis_installed_libraries_list}) +foreach (target ${external_googleapis_installed_libraries_list} + google_cloud_cpp_logging_type_type_protos) external_googleapis_install_pc("${target}" "${CMAKE_CURRENT_LIST_DIR}") # TODO(#5726) - also install the module with the legacy name external_googleapis_install_legacy_pc("${target}" "${CMAKE_CURRENT_LIST_DIR}") endforeach () +external_googleapis_install_pc_common(google_cloud_cpp_logging_type_protos) +set(GOOGLE_CLOUD_CPP_PC_LIBS "") +configure_file("${CMAKE_CURRENT_LIST_DIR}/config.pc.in" + "google_cloud_cpp_logging_type_protos.pc" @ONLY) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/google_cloud_cpp_logging_type_protos.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT google_cloud_cpp_development) +# TODO(#5726) - also install the module with the legacy name +configure_file("${CMAKE_CURRENT_LIST_DIR}/config.pc.in" + "googleapis_cpp_logging_type_protos.pc" @ONLY) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/googleapis_cpp_logging_type_protos.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT google_cloud_cpp_development) + # Create and install the googleapis pkg-config file for backwards compatibility. set(GOOGLE_CLOUD_CPP_PC_NAME "The Google APIS C++ Proto Library") set(GOOGLE_CLOUD_CPP_PC_DESCRIPTION diff --git a/external/googleapis/protodeps/bigquery.deps b/external/googleapis/protodeps/bigquery.deps new file mode 100644 index 0000000000000..69dbd0b02f272 --- /dev/null +++ b/external/googleapis/protodeps/bigquery.deps @@ -0,0 +1,10 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/iam/v1:iam_policy_proto +@com_google_googleapis//google/iam/v1:options_proto +@com_google_googleapis//google/iam/v1:policy_proto +@com_google_googleapis//google/rpc:status_proto +@com_google_googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/bigtable.deps b/external/googleapis/protodeps/bigtable.deps new file mode 100644 index 0000000000000..42ef3bf151161 --- /dev/null +++ b/external/googleapis/protodeps/bigtable.deps @@ -0,0 +1,11 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/iam/v1:iam_policy_proto +@com_google_googleapis//google/iam/v1:options_proto +@com_google_googleapis//google/iam/v1:policy_proto +@com_google_googleapis//google/longrunning:operations_proto +@com_google_googleapis//google/rpc:status_proto +@com_google_googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/dialogflow.deps b/external/googleapis/protodeps/dialogflow.deps new file mode 100644 index 0000000000000..f2acad2991899 --- /dev/null +++ b/external/googleapis/protodeps/dialogflow.deps @@ -0,0 +1,8 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/longrunning:operations_proto +@com_google_googleapis//google/rpc:status_proto +@com_google_googleapis//google/type:latlng_proto diff --git a/external/googleapis/protodeps/iam.deps b/external/googleapis/protodeps/iam.deps new file mode 100644 index 0000000000000..1f576e0d79f53 --- /dev/null +++ b/external/googleapis/protodeps/iam.deps @@ -0,0 +1,9 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/iam/v1:iam_policy_proto +@com_google_googleapis//google/iam/v1:options_proto +@com_google_googleapis//google/iam/v1:policy_proto +@com_google_googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/logging.deps b/external/googleapis/protodeps/logging.deps new file mode 100644 index 0000000000000..a94237880a8e3 --- /dev/null +++ b/external/googleapis/protodeps/logging.deps @@ -0,0 +1,12 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:distribution_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:label_proto +@com_google_googleapis//google/api:launch_stage_proto +@com_google_googleapis//google/api:metric_proto +@com_google_googleapis//google/api:monitored_resource_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/logging/type:type_proto +@com_google_googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/logging_type.deps b/external/googleapis/protodeps/logging_type.deps new file mode 100644 index 0000000000000..f55c189d54def --- /dev/null +++ b/external/googleapis/protodeps/logging_type.deps @@ -0,0 +1,2 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:http_proto diff --git a/external/googleapis/protodeps/monitoring.deps b/external/googleapis/protodeps/monitoring.deps new file mode 100644 index 0000000000000..8d9fd6f2e053d --- /dev/null +++ b/external/googleapis/protodeps/monitoring.deps @@ -0,0 +1,13 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:distribution_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:label_proto +@com_google_googleapis//google/api:launch_stage_proto +@com_google_googleapis//google/api:metric_proto +@com_google_googleapis//google/api:monitored_resource_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/longrunning:operations_proto +@com_google_googleapis//google/rpc:status_proto +@com_google_googleapis//google/type:calendar_period_proto diff --git a/external/googleapis/protodeps/pubsub.deps b/external/googleapis/protodeps/pubsub.deps new file mode 100644 index 0000000000000..bf47e0393e0e1 --- /dev/null +++ b/external/googleapis/protodeps/pubsub.deps @@ -0,0 +1,5 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto diff --git a/external/googleapis/protodeps/spanner.deps b/external/googleapis/protodeps/spanner.deps new file mode 100644 index 0000000000000..42ef3bf151161 --- /dev/null +++ b/external/googleapis/protodeps/spanner.deps @@ -0,0 +1,11 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/iam/v1:iam_policy_proto +@com_google_googleapis//google/iam/v1:options_proto +@com_google_googleapis//google/iam/v1:policy_proto +@com_google_googleapis//google/longrunning:operations_proto +@com_google_googleapis//google/rpc:status_proto +@com_google_googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/speech.deps b/external/googleapis/protodeps/speech.deps new file mode 100644 index 0000000000000..fbb789cdc5697 --- /dev/null +++ b/external/googleapis/protodeps/speech.deps @@ -0,0 +1,6 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/longrunning:operations_proto +@com_google_googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/storage.deps b/external/googleapis/protodeps/storage.deps new file mode 100644 index 0000000000000..27902e3fee92c --- /dev/null +++ b/external/googleapis/protodeps/storage.deps @@ -0,0 +1,10 @@ +@com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto +@com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto +@com_google_googleapis//google/iam/v1:iam_policy_proto +@com_google_googleapis//google/iam/v1:options_proto +@com_google_googleapis//google/iam/v1:policy_proto +@com_google_googleapis//google/type:date_proto +@com_google_googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/texttospeech.deps b/external/googleapis/protodeps/texttospeech.deps index 0beb45525e63c..bf47e0393e0e1 100644 --- a/external/googleapis/protodeps/texttospeech.deps +++ b/external/googleapis/protodeps/texttospeech.deps @@ -1,5 +1,5 @@ -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:client_proto @com_google_googleapis//google/api:annotations_proto +@com_google_googleapis//google/api:client_proto +@com_google_googleapis//google/api:field_behavior_proto @com_google_googleapis//google/api:http_proto +@com_google_googleapis//google/api:resource_proto diff --git a/external/googleapis/protolists/bigquery.list b/external/googleapis/protolists/bigquery.list new file mode 100644 index 0000000000000..5e5e84037a72c --- /dev/null +++ b/external/googleapis/protolists/bigquery.list @@ -0,0 +1,16 @@ +@com_google_googleapis//google/cloud/bigquery/connection/v1:connection.proto +@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer.proto +@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:transfer.proto +@com_google_googleapis//google/cloud/bigquery/logging/v1:audit_data.proto +@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation.proto +@com_google_googleapis//google/cloud/bigquery/storage/v1:arrow.proto +@com_google_googleapis//google/cloud/bigquery/storage/v1:avro.proto +@com_google_googleapis//google/cloud/bigquery/storage/v1:protobuf.proto +@com_google_googleapis//google/cloud/bigquery/storage/v1:storage.proto +@com_google_googleapis//google/cloud/bigquery/storage/v1:stream.proto +@com_google_googleapis//google/cloud/bigquery/storage/v1:table.proto +@com_google_googleapis//google/cloud/bigquery/v2:encryption_config.proto +@com_google_googleapis//google/cloud/bigquery/v2:model.proto +@com_google_googleapis//google/cloud/bigquery/v2:model_reference.proto +@com_google_googleapis//google/cloud/bigquery/v2:standard_sql.proto +@com_google_googleapis//google/cloud/bigquery/v2:table_reference.proto diff --git a/external/googleapis/protolists/bigtable.list b/external/googleapis/protolists/bigtable.list new file mode 100644 index 0000000000000..3942e4c19fd5c --- /dev/null +++ b/external/googleapis/protolists/bigtable.list @@ -0,0 +1,7 @@ +@com_google_googleapis//google/bigtable/admin/v2:bigtable_instance_admin.proto +@com_google_googleapis//google/bigtable/admin/v2:bigtable_table_admin.proto +@com_google_googleapis//google/bigtable/admin/v2:common.proto +@com_google_googleapis//google/bigtable/admin/v2:instance.proto +@com_google_googleapis//google/bigtable/admin/v2:table.proto +@com_google_googleapis//google/bigtable/v2:bigtable.proto +@com_google_googleapis//google/bigtable/v2:data.proto diff --git a/external/googleapis/protolists/dialogflow.list b/external/googleapis/protolists/dialogflow.list new file mode 100644 index 0000000000000..c0990db416720 --- /dev/null +++ b/external/googleapis/protolists/dialogflow.list @@ -0,0 +1,21 @@ +@com_google_googleapis//google/cloud/dialogflow/v2:agent.proto +@com_google_googleapis//google/cloud/dialogflow/v2:answer_record.proto +@com_google_googleapis//google/cloud/dialogflow/v2:audio_config.proto +@com_google_googleapis//google/cloud/dialogflow/v2:context.proto +@com_google_googleapis//google/cloud/dialogflow/v2:conversation_event.proto +@com_google_googleapis//google/cloud/dialogflow/v2:conversation_profile.proto +@com_google_googleapis//google/cloud/dialogflow/v2:conversation.proto +@com_google_googleapis//google/cloud/dialogflow/v2:document.proto +@com_google_googleapis//google/cloud/dialogflow/v2:entity_type.proto +@com_google_googleapis//google/cloud/dialogflow/v2:environment.proto +@com_google_googleapis//google/cloud/dialogflow/v2:fulfillment.proto +@com_google_googleapis//google/cloud/dialogflow/v2:gcs.proto +@com_google_googleapis//google/cloud/dialogflow/v2:human_agent_assistant_event.proto +@com_google_googleapis//google/cloud/dialogflow/v2:intent.proto +@com_google_googleapis//google/cloud/dialogflow/v2:knowledge_base.proto +@com_google_googleapis//google/cloud/dialogflow/v2:participant.proto +@com_google_googleapis//google/cloud/dialogflow/v2:session_entity_type.proto +@com_google_googleapis//google/cloud/dialogflow/v2:session.proto +@com_google_googleapis//google/cloud/dialogflow/v2:validation_result.proto +@com_google_googleapis//google/cloud/dialogflow/v2:version.proto +@com_google_googleapis//google/cloud/dialogflow/v2:webhook.proto diff --git a/external/googleapis/protolists/iam.list b/external/googleapis/protolists/iam.list new file mode 100644 index 0000000000000..23fb04bd65315 --- /dev/null +++ b/external/googleapis/protolists/iam.list @@ -0,0 +1,4 @@ +@com_google_googleapis//google/iam/admin/v1:audit_data.proto +@com_google_googleapis//google/iam/admin/v1:iam.proto +@com_google_googleapis//google/iam/credentials/v1:common.proto +@com_google_googleapis//google/iam/credentials/v1:iamcredentials.proto diff --git a/external/googleapis/protolists/logging.list b/external/googleapis/protolists/logging.list new file mode 100644 index 0000000000000..458b3bc37a629 --- /dev/null +++ b/external/googleapis/protolists/logging.list @@ -0,0 +1,4 @@ +@com_google_googleapis//google/logging/v2:log_entry.proto +@com_google_googleapis//google/logging/v2:logging_config.proto +@com_google_googleapis//google/logging/v2:logging_metrics.proto +@com_google_googleapis//google/logging/v2:logging.proto diff --git a/external/googleapis/protolists/logging_type.list b/external/googleapis/protolists/logging_type.list new file mode 100644 index 0000000000000..fde81c913e41d --- /dev/null +++ b/external/googleapis/protolists/logging_type.list @@ -0,0 +1,2 @@ +@com_google_googleapis//google/logging/type:http_request.proto +@com_google_googleapis//google/logging/type:log_severity.proto diff --git a/external/googleapis/protolists/monitoring.list b/external/googleapis/protolists/monitoring.list new file mode 100644 index 0000000000000..8a507aa584459 --- /dev/null +++ b/external/googleapis/protolists/monitoring.list @@ -0,0 +1,17 @@ +@com_google_googleapis//google/monitoring/v3:alert.proto +@com_google_googleapis//google/monitoring/v3:alert_service.proto +@com_google_googleapis//google/monitoring/v3:common.proto +@com_google_googleapis//google/monitoring/v3:dropped_labels.proto +@com_google_googleapis//google/monitoring/v3:group.proto +@com_google_googleapis//google/monitoring/v3:group_service.proto +@com_google_googleapis//google/monitoring/v3:metric.proto +@com_google_googleapis//google/monitoring/v3:metric_service.proto +@com_google_googleapis//google/monitoring/v3:mutation_record.proto +@com_google_googleapis//google/monitoring/v3:notification.proto +@com_google_googleapis//google/monitoring/v3:notification_service.proto +@com_google_googleapis//google/monitoring/v3:query_service.proto +@com_google_googleapis//google/monitoring/v3:service.proto +@com_google_googleapis//google/monitoring/v3:service_service.proto +@com_google_googleapis//google/monitoring/v3:span_context.proto +@com_google_googleapis//google/monitoring/v3:uptime.proto +@com_google_googleapis//google/monitoring/v3:uptime_service.proto diff --git a/external/googleapis/protolists/pubsub.list b/external/googleapis/protolists/pubsub.list new file mode 100644 index 0000000000000..613ad8287ac85 --- /dev/null +++ b/external/googleapis/protolists/pubsub.list @@ -0,0 +1,2 @@ +@com_google_googleapis//google/pubsub/v1:pubsub.proto +@com_google_googleapis//google/pubsub/v1:schema.proto diff --git a/external/googleapis/protolists/spanner.list b/external/googleapis/protolists/spanner.list new file mode 100644 index 0000000000000..b743ff0991ac6 --- /dev/null +++ b/external/googleapis/protolists/spanner.list @@ -0,0 +1,12 @@ +@com_google_googleapis//google/spanner/admin/database/v1:backup.proto +@com_google_googleapis//google/spanner/admin/database/v1:common.proto +@com_google_googleapis//google/spanner/admin/database/v1:spanner_database_admin.proto +@com_google_googleapis//google/spanner/admin/instance/v1:spanner_instance_admin.proto +@com_google_googleapis//google/spanner/v1:commit_response.proto +@com_google_googleapis//google/spanner/v1:keys.proto +@com_google_googleapis//google/spanner/v1:mutation.proto +@com_google_googleapis//google/spanner/v1:query_plan.proto +@com_google_googleapis//google/spanner/v1:result_set.proto +@com_google_googleapis//google/spanner/v1:spanner.proto +@com_google_googleapis//google/spanner/v1:transaction.proto +@com_google_googleapis//google/spanner/v1:type.proto diff --git a/external/googleapis/protolists/speech.list b/external/googleapis/protolists/speech.list new file mode 100644 index 0000000000000..88b2f957fe542 --- /dev/null +++ b/external/googleapis/protolists/speech.list @@ -0,0 +1 @@ +@com_google_googleapis//google/cloud/speech/v1:cloud_speech.proto diff --git a/external/googleapis/protolists/storage.list b/external/googleapis/protolists/storage.list new file mode 100644 index 0000000000000..69b9a97eff1c4 --- /dev/null +++ b/external/googleapis/protolists/storage.list @@ -0,0 +1 @@ +@com_google_googleapis//google/storage/v2:storage.proto diff --git a/external/googleapis/update_libraries.sh b/external/googleapis/update_libraries.sh index e92c62bcbc3a0..cdaa0bc9f5530 100755 --- a/external/googleapis/update_libraries.sh +++ b/external/googleapis/update_libraries.sh @@ -16,24 +16,67 @@ set -euo pipefail declare -A -r LIBRARIES=( + ["bigquery"]="$( + printf ",%s" \ + "@com_google_googleapis//google/cloud/bigquery/v2:bigquery_proto" \ + "@com_google_googleapis//google/cloud/bigquery/storage/v1:storage_proto" \ + "@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation_proto" \ + "@com_google_googleapis//google/cloud/bigquery/logging/v1:logging_proto" \ + "@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_proto" \ + "@com_google_googleapis//google/cloud/bigquery/connection/v1:connection_proto" + )" + ["bigtable"]="$( + printf ",%s" \ + "@com_google_googleapis//google/bigtable/v2:bigtable_proto" \ + "@com_google_googleapis//google/bigtable/admin/v2:admin_proto" + )" + ["dialogflow"]="@com_google_googleapis//google/cloud/dialogflow/v2:dialogflow_proto" + ["iam"]="$( + printf ",%s" \ + "@com_google_googleapis//google/iam/credentials/v1:credentials_proto" \ + "@com_google_googleapis//google/iam/admin/v1:admin_proto" + )" + ["logging_type"]="@com_google_googleapis//google/logging/type:type_proto" + ["logging"]="@com_google_googleapis//google/logging/v2:logging_proto" + ["monitoring"]="@com_google_googleapis//google/monitoring/v3:monitoring_proto" + ["pubsub"]="@com_google_googleapis//google/pubsub/v1:pubsub_proto" + ["spanner"]="$( + printf ",%s" \ + "@com_google_googleapis//google/spanner/v1:spanner_proto" \ + "@com_google_googleapis//google/spanner/admin/instance/v1:instance_proto" \ + "@com_google_googleapis//google/spanner/admin/database/v1:database_proto" + )" + ["speech"]="@com_google_googleapis//google/cloud/speech/v1:speech_proto" + ["storage"]="@com_google_googleapis//google/storage/v2:storage_proto" ["texttospeech"]="@com_google_googleapis//google/cloud/texttospeech/v1:texttospeech_proto" ) for library in "${!LIBRARIES[@]}"; do IFS=',' read -r -a rules <<<"${LIBRARIES[$library]}" - : >"external/googleapis/protolists/${library}.list" - : >"external/googleapis/protodeps/${library}.deps" + files=( + "external/googleapis/protolists/${library}.list" + "external/googleapis/protodeps/${library}.deps" + ) + for file in "${files[@]}"; do + : >"${file}" + done for rule in "${rules[@]}"; do + if [[ -z "${rule}" ]]; then continue; fi path="${rule%:*}" - bazel --batch query --noshow_progress --noshow_loading_progress \ + echo "=== $library $rule $path" + bazel query --noshow_progress --noshow_loading_progress \ "deps(${rule})" | grep "${path}" | grep -E '\.proto$' \ >>"external/googleapis/protolists/${library}.list" - bazel --batch query --noshow_progress --noshow_loading_progress \ + bazel query --noshow_progress --noshow_loading_progress \ "deps(${rule})" | grep "@com_google_googleapis//" | grep _proto | grep -v "${path}" \ >>"external/googleapis/protodeps/${library}.deps" done + for file in "${files[@]}"; do + sort -u "${file}" >"${file}.sorted" + mv "${file}.sorted" "${file}" + done done