googleapis / googleapis/google-cloud-cpp

Revert to `@com_google_protobuf` dependency name after `@bazel_tools` deprecation

Abierto
#15,393 1 comentario 0 reacciones 0 asignados Ver en GitHub
type: cleanup
Lenguaje dominante
C++
Estrellas
659
Forks
462
Merge medio
1 d 2 h
PR fusionados (30 d)
89

Descripción

Introduced in #15362, we are using `@com_google_protobuf` as the repository name for the Protobuf dependency. This was a necessary workaround to support both bzlmod and traditional WORKSPACE-based builds.

The underlying issue is that the `@bazel_tools` repository, which is a "magic" repository built into Bazel, has an internal dependency on Protobuf using the name `@com_google_protobuf`. This reference cannot be overridden using `repo_mapping` in `MODULE.bazel`, forcing us to adopt the `@com_google_protobuf` name for consistency in our WORKSPACE setup.

The Bazel team has [indicated](https://github.com/bazelbuild/bazel/issues/4301#issuecomment-2456643183) that they plan to slowly deprecate `@bazel_tools` and are not planning to make improvements to it. Once `@bazel_tools` is deprecated and the repositories that rely on it have migrated, we should revert our Protobuf dependency to use the canonical `@protobuf` name, as used by bzlmod.

This change will simplify our build configuration and align our project with the broader Bazel ecosystem's conventions.

Reference:
```
diegomarquezp:google-cloud-cpp$ bazelisk query --google_default_credentials --noenable_bzlmod --enable_workspace 'somepath(//google/cloud/storage:google_cloud_cpp_storage_grpc, @com_google_protobuf//src/google/protobuf:arena)'
//google/cloud/storage:google_cloud_cpp_storage_grpc
@googleapis//google/storage/v2:storage_cc_proto
@bazel_tools//tools/proto:cc_toolchain
@com_google_protobuf//:cc_toolchain
@com_google_protobuf//src/google/protobuf:protobuf
@com_google_protobuf//src/google/protobuf:micro_string
@com_google_protobuf//src/google/protobuf:arena
```

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la configuración de dependencias de WORKSPACE y MODULE.bazel descrita en el issue y, a continuación, ejecuta la consulta de Bazel referenciada para inspeccionar las rutas actuales del repositorio. Este trabajo está bloqueado por la retirada y migración planificadas de @bazel_tools. Se considera terminado cuando la configuración pueda usar el nombre canónico @protobuf y ambos modos de compilación compatibles sigan siendo coherentes.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp
Área
build-system
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.