Skip to content

Commit

Permalink
chore: Don't produce docs for hugr binary target (#1313)
Browse files Browse the repository at this point in the history
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 <rust-lang/cargo#6313>.
``` 

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).
  • Loading branch information
aborgna-q authored Jul 16, 2024
1 parent afe1a77 commit 9dedf91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hugr-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,3 +32,4 @@ rstest.workspace = true
[[bin]]
name = "hugr"
path = "src/main.rs"
doc = false

0 comments on commit 9dedf91

Please sign in to comment.