googleapis / googleapis/google-cloud-cpp

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

オープン
#15,393 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
type: cleanup
主要言語
C++
スター
659
フォーク
462
平均マージ
1日 2時間
マージ済み PR(30日)
89

説明

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
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

issue に記載されている WORKSPACE と MODULE.bazel の依存関係設定から始め、続いて参照されている Bazel クエリを実行して、現在のリポジトリパスを調査します。この作業は、予定されている @bazel_tools の非推奨化と移行によってブロックされています。設定で正規の @protobuf 名を使用でき、サポートされている両方のビルドモードの整合性が保たれれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
build-system
issue の種類
リファクタリング
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。