Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd option to include private definition in the documentation. #15347
Comments
This comment has been minimized.
This comment has been minimized.
|
I'm -1. You can use regular comments for internal documentation. |
This comment has been minimized.
This comment has been minimized.
|
Closing, you can actually do this today!
By default rustdoc has a pass to strip private items, but those flags are just disabling that pass from running. |
alexcrichton
closed this
Jul 2, 2014
This comment has been minimized.
This comment has been minimized.
|
This at least not work in my crate. All private definitions are still hidden. Beside that, I get a strange error message "ERROR:rustdoc: unknown pass collapse-docs unindent-comments, skipping" when I use both passes. |
This comment has been minimized.
This comment has been minimized.
|
Hm it appears that they seem to no longer work! reopening. |
alexcrichton
reopened this
Jul 2, 2014
This comment has been minimized.
This comment has been minimized.
|
I’d like this (and a way to have
Navigation in a text editor is not nearly as easy as in rustdoc, where clicking on most things gets you to the documentation of that thing. This is invaluable when working on a large code base that you don’t know very well. |
steveklabnik
added
the
T-rustdoc
label
Jan 23, 2015
This comment has been minimized.
This comment has been minimized.
|
+1. Writing a library, would benefit from being able to see private documentation while I work. |
This comment has been minimized.
This comment has been minimized.
|
It does look like the workaround
works. (Need multiple invocations for "passes"). Recommend close. |
drewcrawford
referenced this issue
Jan 29, 2015
Open
cargo-doc: enable using --html-in-header and other rustdoc flags #331
This comment has been minimized.
This comment has been minimized.
|
@drewcrawford are these |
This comment has been minimized.
This comment has been minimized.
|
They're |
alexcrichton
self-assigned this
Apr 7, 2015
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Apr 8, 2015
alexcrichton
closed this
in
a30f28e
Apr 10, 2015
SimonSapin
referenced this issue
Apr 13, 2015
Closed
cargo doc: add option to document private types #1520
SimonSapin
added a commit
to servo/servo
that referenced
this issue
Jul 17, 2015
SimonSapin
referenced this issue
Jul 17, 2015
Merged
Include private items in `./mach doc` and http://doc.servo.org/ #6655
bors-servo
pushed a commit
to servo/servo
that referenced
this issue
Jul 17, 2015
This comment has been minimized.
This comment has been minimized.
|
We turned this on on http://doc.servo.org/ . It’s better, but not ideal: all |
SimonSapin
referenced this issue
Jul 18, 2015
Closed
Have rustdoc document private items, except `use` and `extern crate` #27104
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton, could you edit #15347 (comment) ?
It should be |
SimonSapin
added a commit
to servo/servo
that referenced
this issue
Jul 20, 2015
bors-servo
pushed a commit
to servo/servo
that referenced
this issue
Jul 20, 2015
josiahdaniels
added a commit
to josiahdaniels/servo
that referenced
this issue
Sep 28, 2015
josiahdaniels
added a commit
to josiahdaniels/servo
that referenced
this issue
Sep 28, 2015
This comment has been minimized.
This comment has been minimized.
|
Would it be possible to always generate a "Developer documentation" section for crates that contains the docs of private items alongside the documentation for the public API ? Both should obviously be separated, but I think it is valuable to have both, and for users to always be able to read both. |
This comment has been minimized.
This comment has been minimized.
|
I agree with gnzlbg. Sometimes it is good to be able to search. |
This comment has been minimized.
This comment has been minimized.
|
It's something that does not change how official documentation is handled, but that could help a bunch of us. |
This comment has been minimized.
This comment has been minimized.
|
I don't see why it shouldn't be provided for the official documentation as well, the split between public API and developer documentation would jut need to be made very clear. Say somebody properly documented some internal standard library function, and I want to read its documentation because I think doing so is FUN. Do I really need to read it online in the source file? Or do I need to get a copy and generate it my self? Seems like unnecessary hassle and probably is contraproductive. Having easier ways to get people to know the internals of libraries, including the standard library is_good_. It helps people become contributors, it gets more eyes on the libraries internals and their implementation, it finds bugs if someone goes "wait a second, that doesn't make sense", or improves performance if somebody else goes "why are they using this algorithm, this other one is way better!". |
nwin commentedJul 2, 2014
Please add an option for rustdoc such that rustdoc creates a proper documentation for private definitions.
While it is in general a good idea to hide these private definitions, as a crate developer it would be very valuable to have a good internal documentation of private types and functions.