-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add rustdoc version into the help popup #88964
Conversation
Some changes occurred in HTML/CSS/JS. |
I feel like the full short-form like the CLI would be enough ( |
So commit hash and commit date as well, sounds good to me! |
Actually, they're already supposed to be in. Funny: $ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustdoc -V
rustdoc 1.57.0-dev
$ rustdoc -V
rustdoc 1.56.0-nightly (af140757b 2021-08-22) |
r? @Nemo157 |
(Weird, I didn't see the I like this change a lot; there have been many times in the past that I've wanted to know what rustdoc version some docs were generated with. However, I'm wondering whether the help popup is the best place to put it. It seems fine to put it there for now, but I wanted to bring up the topic.
I agree with Nemo that having the regular |
I use exactly the same function used for the
I actually see a few advantages to this:
But if you have suggestion for another place, I'm all for it. My second choice was on the crate page (but not sure where to put it though), my third one was in the setting page (but don't like this one much...). |
Does that mean that if different crates in the docs were built with different rustdoc versions, it would only show one of the versions? It seems like we should make sure it shows the version used to build the crate the user is looking it, to avoid any possibility for confusion. |
FWIW, the version thing shouldn't affect docs.rs, since it uses a --resource-suffix that includes the version. But I suppose it could make a difference when documenting locally. |
Actually, cargo since recently deletes files in doc/ when rerunning rustdoc, so it shouldn't make a difference even locally. |
It'll have the last version yes (which is why I thought about putting it into the crate doc page). But like @jyn514 said, unless you are doing something strange, it shouldn't be a concern. |
Although that doesn't help for using |
I also agree with this. |
7895c32
to
26eb5bb
Compare
Done! (updated the screenshot as well) |
Sounds like we're happy with the slight chance for inconsistency on manual cross-version @bors r+ |
📌 Commit 26eb5bb has been approved by |
Add rustdoc version into the help popup After a discussion with a rustdoc user about a specific behaviour, we realized we were not talking about the same version. To add on top of it, it was actually not that simple to find out the version since it was hosted documentation. So to simplify things, I added the version into the help popup: ![Screenshot from 2021-09-16 10-45-52](https://user-images.githubusercontent.com/3050060/133581128-b93b460a-e1cb-4a31-9f2f-97c7a916cfcc.png) Does the version format looks or would you prefer that I add more information? We can also add the commit hash, commit date, host and release. cc `@rust-lang/rustdoc` r? `@jyn514`
☔ The latest upstream changes (presumably #88219) made this pull request unmergeable. Please resolve the merge conflicts. |
26eb5bb
to
cd3f4da
Compare
@bors: r=Nemo157 |
📌 Commit cd3f4da has been approved by |
…laumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#86422 (Emit clearer diagnostics for parens around `for` loop heads) - rust-lang#87460 (Point to closure when emitting 'cannot move out' for captured variable) - rust-lang#87566 (Recover invalid assoc type bounds using `==`) - rust-lang#88666 (Improve build command for compiler docs) - rust-lang#88899 (Do not issue E0071 if a type error has already been reported) - rust-lang#88949 (Fix handling of `hir::GenericArg::Infer` in `wrong_number_of_generic_args.rs`) - rust-lang#88953 (Add chown functions to std::os::unix::fs to change the owner and group of files) - rust-lang#88954 (Allow `panic!("{}", computed_str)` in const fn.) - rust-lang#88964 (Add rustdoc version into the help popup) - rust-lang#89012 (Suggest removing `#![feature]` for library features that have been stabilized) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
After a discussion with a rustdoc user about a specific behaviour, we realized we were not talking about the same version. To add on top of it, it was actually not that simple to find out the version since it was hosted documentation.
So to simplify things, I added the version into the help popup:
Does the version format looks or would you prefer that I add more information? We can also add the commit hash, commit date, host and release.
cc @rust-lang/rustdoc
r? @jyn514