From 9dedf9159382be51b7babe07e2f2784539922797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20Borgna?= <121866228+aborgna-q@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:31:53 +0100 Subject: [PATCH] chore: Don't produce docs for `hugr` binary target (#1313) This avoids the error due to duplicated target names, as the binary `hugr` has the same name as the main library `hugr`. `cargo doc` showed this warning: ``` warning: output filename collision. The bin target `hugr` in package `hugr-cli v0.1.4 (/home/runner/work/hugr/hugr/hugr-cli)` has the same output filename as the lib target `hugr` in package `hugr v0.8.0 (/home/runner/work/hugr/hugr/hugr)`. Colliding filename is: /home/runner/work/hugr/hugr/target/doc/hugr/index.html The targets should have unique names. This is a known bug where multiple crates with the same name use the same path; see . ``` This caused the resulting docs to produce non-deterministic output, with either target overriding the other. See [cargo#6313](https://www.github.com/rust-lang/cargo/issues/6313). --- hugr-cli/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hugr-cli/Cargo.toml b/hugr-cli/Cargo.toml index 9b4567a93..b74886a2e 100644 --- a/hugr-cli/Cargo.toml +++ b/hugr-cli/Cargo.toml @@ -5,14 +5,13 @@ edition = { workspace = true } rust-version = { workspace = true } license = { workspace = true } readme = "README.md" -documentation = "https://docs.rs/hugr-passes/" +documentation = "https://docs.rs/hugr-cli/" homepage = { workspace = true } repository = { workspace = true } description = "Compiler passes for Quantinuum's HUGR" keywords = ["Quantum", "Quantinuum"] categories = ["compilers"] - [dependencies] clap = { workspace = true, features = ["derive"] } clap-stdin.workspace = true @@ -33,3 +32,4 @@ rstest.workspace = true [[bin]] name = "hugr" path = "src/main.rs" +doc = false