Skip to content

Commit 8630466

Browse files
fix clippy
Signed-off-by: zhangjinpeng87 <zzzhangjinpeng@gmail.com>
1 parent ce20bdf commit 8630466

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ format:
4444
CLIPPY_WHITELIST += -A clippy::bool_assert_comparison
4545
## Run clippy.
4646
clippy:
47-
# Fresh lockfile resolution can pull grpcio 0.13.x via kvproto (grpcio = "0.*"),
48-
# which fails to build on macOS arm64 in current CI images. Force a compatible
49-
# selection before linting.
50-
cargo ${TOOLCHAIN_ARGS} update -p grpcio@0.13.0 --precise 0.10.2 || true
47+
# Fresh lockfile resolution can pull grpcio/grpcio-sys versions that fail on
48+
# macOS arm64 CI images. Force compatible selections before linting.
49+
@if cargo ${TOOLCHAIN_ARGS} tree --all-features -i 'grpcio@0.13.0' >/dev/null 2>&1; then \
50+
cargo ${TOOLCHAIN_ARGS} update -p grpcio@0.13.0 --precise 0.10.2; \
51+
fi
52+
@if cargo ${TOOLCHAIN_ARGS} tree --all-features -i 'grpcio-sys@0.10.3+1.44.0-patched' >/dev/null 2>&1; then \
53+
cargo ${TOOLCHAIN_ARGS} update -p grpcio-sys@0.10.3+1.44.0-patched --precise 0.10.1+1.44.0; \
54+
fi
5155
ifdef WITH_NIGHTLY_FEATURES
5256
cargo ${TOOLCHAIN_ARGS} clippy --all --features nightly_group,failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
5357
else

0 commit comments

Comments
 (0)