Skip to content

Commit db8cc9d

Browse files
author
Sebastian Thiel
committed
Adapt to new way of fetching APIs - it comes with code generation
1 parent 5f517e7 commit db8cc9d

File tree

8 files changed

+21
-22
lines changed

8 files changed

+21
-22
lines changed

Diff for: README.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,13 @@ to one that you just build. Typical invocations would look like this:
1717
(cd ../generator && cargo build) && just MCP=$PWD/../generator/target/debug/mcp update-drivers
1818
```
1919

20-
### Forcefully regenerating/rebuilding crates even if they errorred before
20+
### Forcefully regenerating/rebuilding crates even if they failed to generate/build before
2121

2222
The system will remember generator and cargo errors, and not attempt to work on the affected APIs again, unless these files are cleared.
23-
This can be done manually, or by force.
23+
This can be done manually, but most of the time you will want to refresh everything, and check for errors.
2424

2525
```
26-
just refresh-with-force
27-
```
28-
29-
From there you would usually go with the following to gather all error data with refreshed code:
30-
```
31-
just collect-errors
26+
just refresh-all
3227
```
3328

3429
### Forcefully update the Makefile after a change affecting the mapped index

Diff for: etc/api/container/v1beta1/spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"canonicalName": "Container",
88
"fullyEncodeReservedExpansion": true,
99
"version": "v1beta1",
10-
"revision": "20190628",
10+
"revision": "20190812",
1111
"title": "Kubernetes Engine API",
1212
"description": "Builds and manages container-based applications, powered by the open source Kubernetes technology.",
1313
"ownerDomain": "google.com",

Diff for: etc/api/runtimeconfig/v1/spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"canonicalName": "Cloud RuntimeConfig",
88
"fullyEncodeReservedExpansion": true,
99
"version": "v1",
10-
"revision": "20190819",
10+
"revision": "20190822",
1111
"title": "Cloud Runtime Configuration API",
1212
"description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.",
1313
"ownerDomain": "google.com",

Diff for: etc/api/runtimeconfig/v1beta1/spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"canonicalName": "Cloud RuntimeConfig",
88
"fullyEncodeReservedExpansion": true,
99
"version": "v1beta1",
10-
"revision": "20190819",
10+
"revision": "20190822",
1111
"title": "Cloud Runtime Configuration API",
1212
"description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.",
1313
"ownerDomain": "google.com",

Diff for: etc/api/servicecontrol/v1/spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"canonicalName": "Service Control",
88
"fullyEncodeReservedExpansion": true,
99
"version": "v1",
10-
"revision": "20190816",
10+
"revision": "20190810",
1111
"title": "Service Control API",
1212
"description": "Provides control plane functionality to managed services, such as logging, monitoring, and status checks.",
1313
"ownerDomain": "google.com",

Diff for: etc/api/servicemanagement/v1/spec.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"canonicalName": "Service Management",
88
"fullyEncodeReservedExpansion": true,
99
"version": "v1",
10-
"revision": "20190809",
10+
"revision": "20190816",
1111
"title": "Service Management API",
1212
"description": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.",
1313
"ownerDomain": "google.com",

Diff for: etc/api/toolresults/v1beta3/spec.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"kind": "discovery#restDescription",
3-
"etag": "\"9eZ1uxVRThTDhLJCZHhqs3eQWz4/uhyHOYXYldiARLSzJi77wNDgCvw\"",
3+
"etag": "\"9eZ1uxVRThTDhLJCZHhqs3eQWz4/BXvf1UotF2LiymSOKSxDnp5W19c\"",
44
"discoveryVersion": "v1",
55
"id": "toolresults:v1beta3",
66
"name": "toolresults",
77
"canonicalName": "Tool Results",
88
"fullyEncodeReservedExpansion": null,
99
"version": "v1beta3",
10-
"revision": "20190821",
10+
"revision": "20190822",
1111
"title": "Cloud Tool Results API",
1212
"description": "Reads and publishes results from Firebase Test Lab.",
1313
"ownerDomain": "google.com",
@@ -2478,6 +2478,7 @@
24782478
"enum": [
24792479
"anr",
24802480
"availableDeepLinks",
2481+
"blankScreen",
24812482
"compatibleWithOrchestrator",
24822483
"completeRoboScriptExecution",
24832484
"crashDialogError",
@@ -2494,6 +2495,7 @@
24942495
"nativeCrash",
24952496
"nonSdkApiUsageReport",
24962497
"nonSdkApiUsageViolation",
2498+
"overlappingUiElements",
24972499
"performedGoogleLogin",
24982500
"performedMonkeyActions",
24992501
"startActivityNotFound",
@@ -2529,6 +2531,8 @@
25292531
"",
25302532
"",
25312533
"",
2534+
"",
2535+
"",
25322536
""
25332537
],
25342538
"properties": {},

Diff for: justfile

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ help:
1717
cat <<EOF
1818
Run 'just --list' for more details, here is an overview
1919
-- Used most often... ---------------------------------------------------------------------------)
20-
'refresh-pruned-specs' and 'refresh-with-force'
20+
'refresh-pruned-specs' and 'refresh-all'
2121
'gen/all' and 'gen/cargo check'
2222
-- The source of it all -- first mentioned serve as input for these mentioned later -------------)
2323
'refresh-google-api-index' and 'fetch-api-specs-pruned' and 'fetch-api-specs-google'
@@ -57,11 +57,11 @@ update-drivers: _map-api-index mcp
5757

5858
# fetch API specifications from Google's discovery service, based on the list of ones we know work
5959
fetch-api-specs-pruned: _map-api-index mcp
60-
{{MCP}} fetch-api-specs {{API_INDEX_MAPPED_JSON}} {{SPEC_DIR}}
60+
{{MCP}} fetch-api-specs {{API_INDEX_MAPPED_JSON}} {{SPEC_DIR}} {{OUTPUT_DIR}}
6161

62-
# fetch API specifications from Google's discovery service, based the entire index of available APIs
62+
# fetch API specifications from Google's discovery service, based the entire index of available APIs, and regenerate code
6363
fetch-api-specs-google: refresh-api-index
64-
{{MCP}} fetch-api-specs {{API_INDEX_JSON}} {{SPEC_DIR}}
64+
{{MCP}} fetch-api-specs {{API_INDEX_JSON}} {{SPEC_DIR}} {{OUTPUT_DIR}}
6565

6666
# fetch latest API specifications known to be working, just make it work!
6767
refresh-pruned-specs: fetch-api-specs-pruned update-drivers
@@ -73,6 +73,8 @@ refresh-with-force:
7373
just fetch-api-specs-google
7474
just update-drivers
7575

76+
# clear errors, fetch latest index from google, and fetch all specs, run cargo check and doc
77+
refresh-all: refresh-with-force collect-errors
7678

7779
any_error := "*"
7880
# valid prefixes: generator or cargo
@@ -91,11 +93,9 @@ show-errors prefix=any_error:
9193
cat "$fp"
9294
done
9395

94-
# Best after 'refresh-with-force', it generates all code and runs cargo against it, collecting errors
96+
# Best after 'refresh-all', it generates all code and runs cargo against it, collecting errors
9597
collect-errors:
9698
just mcp
97-
just gen-all || true
98-
just update-drivers
9999
just gen-check || true
100100
just update-drivers
101101
just gen-doc || true

0 commit comments

Comments
 (0)