Skip to content
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

Simplify rustdoc URLs #34271

Closed
nrc opened this issue Jun 14, 2016 · 4 comments
Closed

Simplify rustdoc URLs #34271

nrc opened this issue Jun 14, 2016 · 4 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Jun 14, 2016

The URLs for items in Rustdoc are Byzantine combinations of the kind of item, the parent (module/struct/enum, etc) and the name of the item. These are impossible for tools to synthesise without deep knowledge of the program structure (and pretty difficult even with that knowledge). They should be much simpler.

Question: are there any advantages of the current scheme?

@nrc nrc added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 14, 2016
@steveklabnik
Copy link
Member

I find them kind of okay to write by hand. Not great, but not terrible. Would welcome improvements.

On Jun 14, 2016, 10:07 +0100, Nick Cameronnotifications@github.com, wrote:

The URLs for items in Rustdoc are Byzantine combinations of the kind of item, the parent (module/struct/enum, etc) and the name of the item. These are impossible for tools to synthesise without deep knowledge of the program structure (and pretty difficult even with that knowledge). They should be much simpler.

Question: are there any advantages of the current scheme?


You are receiving this because you are subscribed to this thread.
Reply to this email directly,view it on GitHub(#34271), ormute the thread(https://github.com/notifications/unsubscribe/AABsiqyHb-9OOX3034jYSp-lshOv3qlBks5qLm9YgaJpZM4I1G6Q).

@alexcrichton
Copy link
Member

I personally type the path specifically with modules (e.g. /std/net/) although I'd also be fine if we emitted a bunch more redirect pages like /__redirect/<id>.html which just goes to the right place.

nrc added a commit to nrc/rust that referenced this issue Jul 31, 2016
Changes rustdoc URLs to name.namespace.html, e.g., Foo.t.html. These are easier for clients to guess since they only need to know the namespace, not the kind of item.

Old URLs are preserved as redirects to the new ones.

I also add redirects for modules, e.g.,
foo/bar/baz.t.html to foo/bar/baz/index.html, so modules are not an exception to the URL rule.

And removes the ! from macro URLs.

Closes rust-lang#34271
@steveklabnik
Copy link
Member

Triage: I talked extremely briefly with @nrc two weeks ago in Hawaii and I vaguely remember him saying "yeah we're giving up on this." Is this true? Should this be closed? My memory is very likely to be faulty.

@steveklabnik
Copy link
Member

Oh wait, #35236 was a re-do of #35020 which was supposed to close this. So I think this should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants