@@ -28,26 +28,31 @@ cd $HOME/google-cloud-cpp
2828``` shell
2929library=... # The name of your new library in the google-cloud-cpp repository
3030subdir=" google/cloud/${library} " # The path in googleapis repo, may not start with google/cloud/
31- bazel_output_base=" $( bazel info output_base) "
31+ bazel_output_base=" $( bazelisk info output_base) "
3232```
3333
3434### Verify the C++ rules exist
3535
36+ You may need to
37+ [ Send a PR to update the googleapis SHA to the latest version] ( ../contributor/howto-guide-update-googleapis-sha.md ) .
38+ Wait until that is submitted before proceeding any further for the following 2
39+ cases:
40+
41+ 1 . The dependency does not exist at the pinned version of the googleapis repo.
42+
3643``` shell
37- bazel --batch query --noshow_progress --noshow_loading_progress \
44+ bazelisk --batch query --noshow_progress --noshow_loading_progress \
3845 " kind(cc_library, @com_google_googleapis//${subdir} /...)"
3946```
4047
41- If the command fails, it returns something like this:
48+ - If the command fails, it returns something like this:
4249
4350``` shell
4451ERROR: no targets found beneath ' commerce'
4552```
4653
47- This means the dependency does not exist at the pinned version of the googleapis
48- repo.
49- [ Send a PR to update the googleapis SHA to the latest version] ( ../contributor/howto-guide-update-googleapis-sha.md ) .
50- Wait until that is submitted before proceeding any further.
54+ 2 . Check ` $bazel_output_base/external/googleapis~/api-index-v1.json ` , if
55+ ` $library ` with the correct version is not in ` apis ` section.
5156
5257### Edit the scripts and configuration
5358
@@ -143,7 +148,7 @@ external/googleapis/update_libraries.sh "${library}"
143148Then run the micro-generator to create the scaffold and the C++ sources:
144149
145150``` shell
146- bazel run \
151+ bazelisk run \
147152 //generator:google-cloud-cpp-codegen -- \
148153 --protobuf_proto_path=" ${bazel_output_base} " /external/protobuf~/src \
149154 --googleapis_proto_path=" ${bazel_output_base} " /external/googleapis~ \
@@ -226,7 +231,7 @@ API. Test your changes with:
226231
227232``` sh
228233gcloud services enable --project=cloud-cpp-testing-resources " ${library} .googleapis.com"
229- bazel run -- //google/cloud/${library} /quickstart:quickstart $params
234+ bazelisk run -- //google/cloud/${library} /quickstart:quickstart $params
230235```
231236
232237Edit the tests so this new quickstart receives the right command-line arguments
@@ -245,6 +250,15 @@ git add ci/abi-dumps
245250git commit -m " Add API baseline"
246251```
247252
253+ The following error is expected for the first run, because the command generates
254+ the ABI dump and fails because there is no previous ABI dump to compare to. When
255+ you run once more, the error is gone.
256+
257+ ```
258+ grep: cmake-out/compat_reports/google_cloud_cpp_parallelstore/src_compat_report.html: No such file or directory
259+ 2024-10-25T19:00:49Z (+57s): ABI Compliance error: google_cloud_cpp_parallelstore
260+ ```
261+
248262### Update the README files
249263
250264The following files probably need some light copy-editing to read less like they
@@ -279,7 +293,7 @@ ci/cloudbuild/build.sh -t checkers-pr
279293### Verify everything compiles
280294
281295``` shell
282- bazel build //google/cloud/${library} /...
296+ bazelisk build //google/cloud/${library} /...
283297ci/cloudbuild/build.sh -t cmake-install-pr
284298```
285299
@@ -359,7 +373,7 @@ git commit -am "generated changes"
359373### Verify everything compiles
360374
361375``` shell
362- bazel build //google/cloud/${library} /...
376+ bazelisk build //google/cloud/${library} /...
363377ci/cloudbuild/build.sh -t cmake-install-pr
364378```
365379
0 commit comments