Skip to content

Commit 812dd81

Browse files
Nathan LeeChromeos LUCI
Nathan Lee
authored and
Chromeos LUCI
committed
devtools/rust_generate.py: Fix bazel commands target
Current bazel commands would run all targets under the working directory, which would fail if some source file targets were deleted. Modify the command to make it only run the targets under cras/. BUG=b:351918667 TEST=devtools/rust_generate.py Disallow-Looks-For-Green: True Change-Id: Id611624adfda2ec2e5db9c7122a18712d4418f13 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5692301 Reviewed-by: Li-Yu Yu <[email protected]> Commit-Queue: Nathan Lee <[email protected]> Tested-by: [email protected] <[email protected]>
1 parent acbda31 commit 812dd81

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build/write_source_files/write_source_file_targets_generated.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ WRITE_SOURCE_FILE_TARGETS = [
88
"@//cras/common:generate_rust_common_h",
99
"@//cras/server/platform/dlc:generate_dlc_h",
1010
"@//cras/server/s2:generate_s2_h",
11+
"@//cras/src/dsp/rust:generate_biquad.h",
1112
"@//cras/src/dsp/rust:generate_dcblock.h",
1213
"@//cras/src/server/rust:generate_cras_feature_tier_h",
1314
"@//cras/src/server/rust:generate_cras_processor_h",

devtools/rust_generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def run(cmd, env=None, **kwargs):
2626

2727
# Update Cargo.Bazel.lock.
2828
run(
29-
['bazel', 'build', '--nobuild', '//...'],
29+
['bazel', 'build', '--nobuild', '//cras/...'],
3030
env={'CARGO_BAZEL_REPIN': 'true'},
3131
)
3232

3333
# Find files to generate.
3434
result = run(
35-
['bazel', 'cquery', 'kind(write_source_file, //...)', '--output=starlark'],
35+
['bazel', 'cquery', 'kind(write_source_file, //cras/...)', '--output=starlark'],
3636
stdout=subprocess.PIPE,
3737
text=True,
3838
)

0 commit comments

Comments
 (0)