@@ -28,26 +28,31 @@ cd $HOME/google-cloud-cpp
28
28
``` shell
29
29
library=... # The name of your new library in the google-cloud-cpp repository
30
30
subdir=" 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) "
32
32
```
33
33
34
34
### Verify the C++ rules exist
35
35
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
+
36
43
``` shell
37
- bazel --batch query --noshow_progress --noshow_loading_progress \
44
+ bazelisk --batch query --noshow_progress --noshow_loading_progress \
38
45
" kind(cc_library, @com_google_googleapis//${subdir} /...)"
39
46
```
40
47
41
- If the command fails, it returns something like this:
48
+ - If the command fails, it returns something like this:
42
49
43
50
``` shell
44
51
ERROR: no targets found beneath ' commerce'
45
52
```
46
53
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.
51
56
52
57
### Edit the scripts and configuration
53
58
@@ -143,7 +148,7 @@ external/googleapis/update_libraries.sh "${library}"
143
148
Then run the micro-generator to create the scaffold and the C++ sources:
144
149
145
150
``` shell
146
- bazel run \
151
+ bazelisk run \
147
152
//generator:google-cloud-cpp-codegen -- \
148
153
--protobuf_proto_path=" ${bazel_output_base} " /external/protobuf~/src \
149
154
--googleapis_proto_path=" ${bazel_output_base} " /external/googleapis~ \
@@ -226,7 +231,7 @@ API. Test your changes with:
226
231
227
232
``` sh
228
233
gcloud 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
230
235
```
231
236
232
237
Edit the tests so this new quickstart receives the right command-line arguments
@@ -245,6 +250,15 @@ git add ci/abi-dumps
245
250
git commit -m " Add API baseline"
246
251
```
247
252
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
+
248
262
### Update the README files
249
263
250
264
The following files probably need some light copy-editing to read less like they
@@ -279,7 +293,7 @@ ci/cloudbuild/build.sh -t checkers-pr
279
293
### Verify everything compiles
280
294
281
295
``` shell
282
- bazel build //google/cloud/${library} /...
296
+ bazelisk build //google/cloud/${library} /...
283
297
ci/cloudbuild/build.sh -t cmake-install-pr
284
298
```
285
299
@@ -359,7 +373,7 @@ git commit -am "generated changes"
359
373
### Verify everything compiles
360
374
361
375
``` shell
362
- bazel build //google/cloud/${library} /...
376
+ bazelisk build //google/cloud/${library} /...
363
377
ci/cloudbuild/build.sh -t cmake-install-pr
364
378
```
365
379
0 commit comments