-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Update links in redirects #1667
Conversation
I guess we should make these link to the 2018 edition where available |
Would you prefer to include both Second Edition and "Current Edition" links, or just Current Edition? These redirects were originally in place to preserve old links to the first edition book, so I don't think they need to link to every edition. Just linking to the original content (First Edition) and the latest content (Current Edition) seems best. |
Updated so that each file has "First Edition" and "Current Edition" links where possible (no Second Edition). |
Hi Matt :) I agree that the places that say "second edition" should say "current edition" and link to the current edition instead, as you've done here. However,
Can you clarify what you mean by "the relative links no longer work"? If I do file:///Users/carolnichols/.rustup/toolchains/stable-x86_64-apple-darwin/share/doc/rust/html/book/deref-coercions.html I get a page that says:
The first edition link goes to file:///Users/carolnichols/.rustup/toolchains/stable-x86_64-apple-darwin/share/doc/rust/html/book/first-edition/deref-coercions.html, which says:
And "find a copy distributed with Rust 1.30" links to https://doc.rust-lang.org/1.30.0/book/first-edition/deref-coercions.html, as you have here. So I do think this is working the way @steveklabnik intended? Is it the extra click and the insinuation that there's going to be content there and then isn't that makes it seem like it doesn't work? |
Yeah, exactly. This PR links directly to the content, instead of to a second old/redirected URL where you have to click through an extra link. |
Ok, I see. I do like the extra "If you have an internet connection" bit that's on the redirect pages, because not shipping the first edition with Rust is a change... wdyt about working that in on the redirect pages? |
I don't think there's a common case where users load these "redirects/" pages while offline. The common way to find them is by following old links from search engines, blog posts, discussion threads, etc. If someone is still relying on these redirect files to navigate their local docs, I think the fact that the first edition links now go to the online site (just like the rustbyexample links) is clear enough without adding more clutter to the page. (We already try to de-emphasize the first edition links by making them smaller, so we clearly think most users want the new edition anyways.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, you've convinced me :) Thank you!
Update the book to fix some edition-related bugs I'd love to have this included in a point release if one happens, but the changes aren't worth doing a point release on their own IMO. I'd definitely like to see this backported to beta. The most urgent changes included here are: - Chapter 19.6, on macros (including the macro changes that just stabilized), [is cut off](rust-lang/book#1668) because of an ill-placed newline in a comment that [pulldown-cmark interprets incorrectly](pulldown-cmark/pulldown-cmark#124). - [The `Cargo.toml` shown in the Guessing Game example in Chapter 2 (and one in Chapter 14) doesn't have `edition="2018"`](rust-lang/book#1671), which can be confusing depending on whether the readers have it in theirs or not, think they should remove it if they have it, and the rest of the chapter assumes it's there and the code doesn't compile if you don't have it. - The redirects implemented as part of only shipping the 2018 edition of the book sometimes lead to [having to click through 2 redirect pages](rust-lang/book#1667) when it could be just one. There are other small corrections included that were made since the last time the book was updated, but those aren't urgent. cc @steveklabnik
Link directly to the 1.30 versions, since the relative links no longer work.