Stream: rustdoc

Topic: Version switching for the standard library


view this post on Zulip Nelson J Morais (Nov 30 2020 at 22:15):

this issue, if it's to be (still) open should be in the docs.rs repo.

view this post on Zulip Nelson J Morais (Nov 30 2020 at 22:15):

issue #30062

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:00):

@Nelson J Morais I don't think that's true? There's no version switcher for https://doc.rust-lang.org/std/vec/struct.Vec.html

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:01):

and actually there is one for docs.rs so it doesn't make sense to move it there

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:15):

how is supposed rustdoc to know about past releases of a project while building documentation?

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:16):

cargo could pass it as a flag maybe

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:16):

it does seem like this should be part of x.py and not rustdoc

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:16):

since docs.rs already does it

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:16):

actually I think x.py can do this today with custom HTML injects

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:17):

hum, it seems you want librustdoc to do allot of stuff.

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:17):

isn't the op asking for a switch in the "online documentation" (aka docs.rs?)

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:17):

ok yes, here we go:

        --html-after-content FILES
                        files to include inline between the content and
                        </body> of a rendered Markdown file or generated
                        documentation

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:17):

x.py could have some custom HTML that acts as a version switcher

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:18):

Nelson J Morais said:

hum, it seems you want librustdoc to do allot of stuff.

well, I don't necessarily want rustdoc to do it, but I think it should be a feature that exists

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:18):

and how do invision that? x.py would query crates.io/docs.rs for past versions and inject a custom made html ul element with versions?

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:19):

no no, I mean just for the standard library

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:19):

and if i'm building my documentation without internet access, and i need it to be readily available?

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:19):

I don't think this needs to exist locally, since you won't have all the versions available

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:19):

ahhhhhh

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:21):

but yeah I think x.py should ideally be able to add this without much trouble

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:21):

it would probably be a pain to backport to old versions though, I think the standard library docs are static files

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:21):

although there's only ~50 of them so maybe it's feasbile

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:21):

let me comment that

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:22):

still can't see rustdoc or x.py with that kind of "responsibility", that should be the applications that's showing the documentation if it has a persisted history of documentations for that specific crate

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:22):

that's exactly what x.py is?

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:22):

it's an application with a persistent history of the standard library

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:23):

well for binaries, not documentation history (as i see it) for that there docs.rs no? :smile:

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:24):

I'm really confused what you're saying, sorry

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:24):

I'm talking specifically about the standard library, which is not on docs.rs

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:26):

ok wait 1sec

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:27):

left a comment on the issue

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:28):

lmk if it helps clarify things :)

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:28):

(sorry was putting kids to bed)

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:29):

can you open the issue? I think we are talking about different things

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:29):

the issue I've posted

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:30):

https://github.com/rust-lang/rust/issues/30062#issuecomment-736116602

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:31):

OK, I see now with your comment where you wanna go.

view this post on Zulip Joshua Nelson (Nov 30 2020 at 23:33):

sorry if I wasn't clear, I know I tend to talk a lot :laughing:

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:34):

ahahahaha

view this post on Zulip Nelson J Morais (Nov 30 2020 at 23:35):

no problem, I suffer from the same problem :wink:


Last updated: Oct 11 2021 at 22:34 UTC