aaron-ai commented on code in PR #490:
URL: https://github.com/apache/rocketmq-clients/pull/490#discussion_r1174312012


##########
.github/workflows/rust_build.yml:
##########
@@ -2,27 +2,114 @@ name: Rust Build
 on:
   workflow_call:
 jobs:
+  fmt-check:
+    runs-on: ubuntu-latest
+    name: fmt
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Install stable
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+          components: rustfmt
+      - name: Code format check
+        working-directory: ./rust
+        run: cargo fmt --check
+  clippy-check:
+    runs-on: ubuntu-latest
+    name: clippy
+    permissions: write-all
+    strategy:
+      fail-fast: false
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Install stable
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+          components: clippy
+      - name: Install protoc
+        uses: arduino/setup-protoc@v1
+        with:
+          version: '3.x'
+          repo-token: ${{ secrets.GITHUB_TOKEN }}
+      - name: Clippy check
+        uses: actions-rs/clippy-check@v1
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          args: --all-features --manifest-path rust/Cargo.toml -- -D warnings
+  doc-check:
+    runs-on: ubuntu-latest
+    name: doc
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Install stable
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: stable
+      - name: Install protoc
+        uses: arduino/setup-protoc@v1
+        with:
+          version: '3.x'
+          repo-token: ${{ secrets.GITHUB_TOKEN }}
+      - name: Build doc
+        working-directory: ./rust
+        run: cargo doc --no-deps --all-features
+        env:
+          RUSTDOCFLAGS: --cfg docsrs
+  msrv-check:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        msrv: [1.61]
+    name: msrv / ${{ matrix.msrv }}
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          submodules: true
+      - name: Install ${{ matrix.msrv }}
+        uses: actions-rs/toolchain@v1
+        with:
+          toolchain: ${{ matrix.msrv }}
+      - name: Install protoc
+        uses: arduino/setup-protoc@v1
+        with:
+          version: '3.x'
+          repo-token: ${{ secrets.GITHUB_TOKEN }}
+      - name: Check MSRV ${{ matrix.msrv }}
+        working-directory: ./rust
+        run: cp Cargo.minimal.lock Cargo.lock && cargo +${{ matrix.msrv }} 
check --locked

Review Comment:
   I'm not quite sure why we need to introduce Cargo.lock, and I currently find 
that one of the major reasons why it can't be compiled on 1.61 is due to the 
[predicates-rs](https://github.com/assert-rs/predicates-rs) package. I wonder 
if we can ensure compatibility of compilation by restricting the version of 
this package.
   
   Below is a configuration that I have verified, for your reference:
   
   ```toml
   predicates = "< 3.0.0"
   predicates-tree = "< 1.0.8"
   predicates-core = "< 1.0.6"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to