-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
C-bugCategory: bugCategory: bugCommand-docS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewZ-per-package-targetNightly: per-package-targetNightly: per-package-target
Description
Problem
Currently if you have a forced-target (with -Zper-package-target) that's not the default, cargo doc --open builds the docs in target/{target_name}/doc but doesn't open it, which is confusing.
Steps
- Clone this repo: https://github.com/dramforever/cargo-doc-forced-target
- Make sure your default target isn't somehow
riscv64gc-unknown-none-elf - Run
cargo doc --open
$ cargo doc --open
Documenting forced-target v0.1.0 (/home/dram/tmp/cargo-doc-forced-target)
Finished dev [unoptimized + debuginfo] target(s) in 0.20s
$ # Nothing opensPossible Solution(s)
cargo doc --target riscv64gc-unknown-none-elf --open works. Maybe we can have cargo doc default to that for forced-target?
I originally encountered this in a workspace. I don't really know how this should interact with workspaces, but I think it should at least work if I explicitly choose cargo doc -p forced_target or use e.g. a --bin from it
Notes
No response
Version
cargo 1.69.0-nightly (82c3bb79e 2023-02-04)
release: 1.69.0-nightly
commit-hash: 82c3bb79e3a19a5164e33819ef81bfc2c984bc56
commit-date: 2023-02-04
host: x86_64-unknown-linux-gnu
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q)
os: NixOS 23.5.0 [64-bit]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: bugCategory: bugCommand-docS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewStatus: Issue or feature is accepted, and has a team member available to help mentor or reviewZ-per-package-targetNightly: per-package-targetNightly: per-package-target