Skip to content

Commit ebcd1a9

Browse files
committed
chore(librarian): fix generation for google-cloud-compute
1 parent 98aa464 commit ebcd1a9

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.generator/parse_googleapis_content.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,15 @@
9595
"proto_library",
9696
"java_proto_library",
9797
"genrule",
98+
"gapic_yaml_from_disco",
99+
"grpc_service_config_from_disco",
100+
"proto_from_disco",
98101
)
99102

103+
_GLOB_CALLABLES = (
104+
"exports_files",
105+
"glob",
106+
)
100107

101108
def parse_content(content: str) -> dict:
102109
"""Parses content from BUILD.bazel and returns a dictionary
@@ -119,11 +126,20 @@ def bazel_target(**args):
119126
def noop_bazel_rule(**args):
120127
pass
121128

122-
for noop_callable in _NOOP_CALLABLES:
123-
mod.add_callable(noop_callable, noop_bazel_rule)
129+
def fake_glob(paths=[], **args):
130+
return []
131+
132+
mod.add_callable("package", noop_bazel_rule)
133+
134+
for glob_callable in _GLOB_CALLABLES:
135+
mod.add_callable(glob_callable, fake_glob)
124136

125137
def load(name):
126138
mod = sl.Module()
139+
140+
for noop_callable in _NOOP_CALLABLES:
141+
mod.add_callable(noop_callable, noop_bazel_rule)
142+
127143
for callable_name in _CALLABLE_MAP.get(name, []):
128144
mod.add_callable(callable_name, bazel_target)
129145
return mod.freeze()

0 commit comments

Comments
 (0)