From 9677d70f2abbe9fcd16d5806e3501d52e4ce9c9d Mon Sep 17 00:00:00 2001 From: katelyn martin Date: Mon, 20 May 2024 00:00:00 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=94=A8=20allow=20duplicate=20depend?= =?UTF-8?q?encies?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit addresses this error linting our dependency tree: ``` error[duplicate]: found 2 duplicate entries for crate 'heck' ┌─ /home/katie/work/tonic/Cargo.lock:58:1 │ 58 │ ╭ heck 0.4.1 registry+https://github.com/rust-lang/crates.io-index 59 │ │ heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index │ ╰────────────────────────────────────────────────────────────────^ lock entries │ = heck v0.4.1 └── strum_macros v0.25.3 └── strum v0.25.0 └── interop v0.1.0 = heck v0.5.0 └── prost-build v0.12.6 ├── (build) disable-comments v0.1.0 ├── tonic-build v0.10.2 │ ├── (build) ambiguous_methods v0.1.0 │ ├── codegen v0.1.0 │ ├── (build) compression v0.1.0 │ ├── (build) default_stubs v0.1.0 │ ├── (build) disable-comments v0.1.0 (*) │ ├── (build) examples v0.1.0 │ ├── (build) included_service v0.1.0 │ ├── (build) integration v0.1.0 │ ├── (build) integration-tests v0.1.0 │ ├── (build) interop v0.1.0 │ ├── (build) my_application v0.1.0 │ ├── (build) root-crate-path v0.1.0 │ ├── (build) same_name v0.1.0 │ ├── (build) service_named_result v0.1.0 │ ├── (build) service_named_service v0.1.0 │ ├── (build) stream_conflict v0.1.0 │ ├── (build) use_arc_self v0.1.0 │ ├── (build) wellknown v0.1.0 │ └── (build) wellknown-compiled v0.1.0 ├── (build) uuid1 v0.1.0 │ └── my_application v0.1.0 (*) └── (build) wellknown-compiled v0.1.0 (*) advisories ok, bans FAILED, licenses ok, sources ok ``` --- .github/workflows/CI.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a3ab20a3f..983eb7a45 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,11 +22,29 @@ jobs: - run: cargo fmt --all --check deny-check: + # NOTE(kate): this allows for duplicate dependencies of a single crate. + # Since 0.10.2 was released, releases have drifted and `prost-build` and + # `strum-macros` depend on different versions of `heck`. + # + # rather than changing v0.10.2, we pass `--allow duplicate` for now, until + # we upgrade to tonic@0.11. + # + # ``` + # error[duplicate]: found 2 duplicate entries for crate 'heck' + # ┌─ /home/katie/work/tonic/Cargo.lock:58:1 + # │ + # 58 │ ╭ heck 0.4.1 registry+https://github.com/rust-lang/crates.io-index + # 59 │ │ heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index + # │ ╰────────────────────────────────────────────────────────────────^ lock entries + # ``` name: cargo-deny check runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: EmbarkStudios/cargo-deny-action@v1 + with: + - command: check + - arguments: --allow duplicate codegen: runs-on: ubuntu-latest