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 uplet rustdoc print the crate version into docs #44989
Conversation
rust-highfive
assigned
steveklabnik
Oct 2, 2017
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in HTML/CSS. |
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
Pings for everyone! @rust-lang/docs Does this look right? Is this a good place for this? Right now it only shows up on the root module's page - nothing else will show this. Should we put it everywhere? @GuillaumeGomez and @steveklabnik specifically (possibly dev-tools more broadly, but for now i'll stick with rustdoc peers) - This is a new command-line flag. In dev-tools meeting today the prevailing air was that this was not RFC worthy since it was straightforward enough, but i want to make extra sure that the other rustdoc stakeholders are on board. @alexcrichton @Mark-Simulacrum (other rustbuild experts?) - How can I get bootstrap to use this flag when rendering docs for std and friends? |
QuietMisdreavus
referenced this pull request
Oct 2, 2017
Closed
Show library version in documentation generated by rustdoc #24336
This comment has been minimized.
This comment has been minimized.
|
Seems to be good. What happens with a very long version name? Does it goes on two lines or does it just stick out of the sidebar? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This is a (smaaall) bug then. :p |
This comment has been minimized.
This comment has been minimized.
|
This sounds good to me! |
shepmaster
added
the
S-waiting-on-author
label
Oct 6, 2017
This comment has been minimized.
This comment has been minimized.
|
Use these styles to fix the wrapping issue on most modern browsers. overflow-wrap: break-word;
word-wrap: break-word; /* deprecated */
word-break: break-word; /* Chrome, non-standard */ |
QuietMisdreavus
force-pushed the
QuietMisdreavus:what-is-your-quest
branch
from
8cdaec5
to
fcee950
Oct 9, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Now it's all good. Thanks! @bors: r+ rollup |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Ah damn, well, r=me once done. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, the rustdoc piece is basically done, but i'd like to see if i can get rustbuild to use this when generating the docs for std and friends before calling it done. I'll ask around again. |
This comment has been minimized.
This comment has been minimized.
|
You'll need to edit Let me know if you'd like more detailed instructions, or I can probably get you a commit implementing this within a few days. |
QuietMisdreavus
changed the title
[WIP] let rustdoc print the crate version into docs
let rustdoc print the crate version into docs
Oct 9, 2017
This comment has been minimized.
This comment has been minimized.
|
@Mark-Simulacrum That got me most of the way there. It turns out that the docs weren't using If you think this is fine, then i'm ready to call this good. |
QuietMisdreavus
force-pushed the
QuietMisdreavus:what-is-your-quest
branch
from
b0b746c
to
ce71c9e
Oct 9, 2017
This comment has been minimized.
This comment has been minimized.
|
Hm, I'm suspecting that |
QuietMisdreavus
force-pushed the
QuietMisdreavus:what-is-your-quest
branch
3 times, most recently
from
21cb80a
to
5a847c6
Oct 10, 2017
This comment has been minimized.
This comment has been minimized.
|
Ooh, i like that option. I've force-pushed with an update that uses that instead. |
Mark-Simulacrum
reviewed
Oct 10, 2017
|
I'm happy with the rustbuild changes after this small nit. |
| @@ -574,6 +574,9 @@ impl<'a> Builder<'a> { | |||
| cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string()); | |||
| } | |||
|
|
|||
| // For `cargo doc` invocations, make rustdoc print the Rust version into the docs | |||
| cargo.env("RUSTDOC_CRATE_VERSION", self.build.rust_version()); | |||
This comment has been minimized.
This comment has been minimized.
Mark-Simulacrum
Oct 10, 2017
Member
Let's also add this to rustdoc_cmd above to make certain it's passed in all cases.
This comment has been minimized.
This comment has been minimized.
QuietMisdreavus
force-pushed the
QuietMisdreavus:what-is-your-quest
branch
from
5a847c6
to
7ea286e
Oct 11, 2017
This comment has been minimized.
This comment has been minimized.
|
@bors r=GuillaumeGomez |
This comment has been minimized.
This comment has been minimized.
|
|




QuietMisdreavus commentedOct 2, 2017
•
edited
This PR adds a new unstable flag to rustdoc,
--crate-version, which when present will add a new entry to the sidebar of the root module, printing the given version number:Closes #24336
(The WIP status is because i don't want to merge this until i can get the std docs to use it, which i need help from rustbuild people to make sure i get right.)