Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cargo doc --open does nothing #1472
Comments
|
Do the docs open if you run |
|
xdg-open works just fine. I am using the kde konsole, in which regular bash is running. Also the full path to my project does only contain [a-zA-Z] characters. |
|
For me
KDE / Konsole:
|
|
My versions are: Qt: 5.4.1 For the date of me making the bug report, these version were very recent. What is about the Konsole version 15.04.0? On my OS (archlinux) Konsole 3.0.1 is the most recent one. |
|
I'm using Arch Linux too, with the |
|
Ah okay. Maybe it will work, when I get access to kde frameworks 5.9.0 and the more recent konsole. I do not want to use testing, but I will come back here and comment again, when I get the update. |
|
This happened to me, and after some digging I think I may have isolated the problem. Although, I'm not sure if my particular case is the same as @ruabmbua's. If the package has executables only but no lib (i.e. There's another separate case: when the package name contains a hyphen in it, then I'm guessing both behaviors are unintended. I believe I know where the culprit lies and I may open a pull request soon... once I devised a viable fix. |
|
@mohtar: Yes it seems like I have the same issue(not having a lib.rs in my source tree). |
|
Well that confirms my suspicions then! |
Since #318, the `doc` command generates documentation for binaries in addition to libraries. But currently running `cargo doc --open` would not launch the browser for binary-only packages, even though it should. This commit changes the logic: binaries will be searched when there are no libraries in the package. A simple test case: `Cargo.toml`: [package] name = "foo" version = "0.1.0" authors = [] `src/main.rs`: pub fn main() { println!("Hello, world!"); } EDIT: I should add that this should fix #1472
The command
cargo doc --openshould build the docs, and open them in a browser after compilation finished.The command only builds the docs, but after building is finished no further action takes place(opening doc in browser). The problem exists for me on both windows and arch linux. Both operating systems have firefox configured as their default browser.