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

Minimize the edition guide #232

Merged
merged 13 commits into from
May 21, 2021
Merged

Conversation

nikomatsakis
Copy link
Contributor

This lays out the new, more minimal structure of the edition guide. I copied and pasted the existing content that was still relevant and also copied in the introduction and the descriptions of the changes from @m-ou-se's blog.

cc @rust-lang/project-edition-2021

- `k#keyword` to allow writing keywords that don't exist yet in the current edition.
For example, while `async` is not a keyword in edition 2015,
this prefix would've allowed us to accept `k#async` in edition 2015
without having to wait for edition 2018 to reserve `async` as a keyword.
Copy link

@ghost ghost May 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing "without having to wait for" to "while we waited for" might make it clearer that async still becomes a keyword in 2018, even with k# available. (I think that's the intent, if this had been available then)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Updated in rust-lang/blog.rust-lang.org#825.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few high-level comments:

  • I would prefer to keep the filename style using hyphens instead of underscores, to be consistent with the rest of the books.
  • I think it would be good to add redirects for the removed pages, otherwise there will be a lot of broken links. mdbook now supports that in book.toml. I think that should work, though the rust-lang linkchecker doesn't work well with it.

It also looks like there are a few errors and broken links here. Let me know if you want help with any of the above.

src/rust-2018/index.md Outdated Show resolved Hide resolved
@nikomatsakis
Copy link
Contributor Author

nikomatsakis commented May 6, 2021

@ehuss

I would prefer to keep the filename style using hyphens instead of underscores, to be consistent with the rest of the books.

OK! No opinion here.

I do have a question: this book uses index.md files, is this something we do elsewhere? (vs src/rust-2015.md, for example)

I think it would be good to add redirects for the removed pages, otherwise there will be a lot of broken links. mdbook now supports that in book.toml. I think that should work, though the rust-lang linkchecker doesn't work well with it.

Good point. I'll look into what support mdbook has for that.

@ehuss
Copy link
Contributor

ehuss commented May 6, 2021

I do have a question: this book uses index.md files, is this something we do elsewhere? (vs src/rust-2015.md, for example)

I think it is fine to use index.md. It is not used commonly elsewhere, but I think that's just an artifact of evolution. For example, the reference had src/types.md as a single file. When it was split into multiple files, I kept the original src/types.md instead of renaming it to src/types/index.md because that would break old links and was too much of a hassle to deal with (and mdbook didn't support renames at the time). Books like TRPL use a flat structure (no directories), though I'm not sure why.

@nikomatsakis
Copy link
Contributor Author

I guess modifying it would require modifying links, and I have no desire to do that.

@steveklabnik
Copy link
Member

Books like TRPL use a flat structure (no directories), though I'm not sure why.

Because the book is older than mdbook is, and the initial build infrastructure was very simple.

@nikomatsakis
Copy link
Contributor Author

Addressed @ehuss's points:

I would prefer to keep the filename style using hyphens instead of underscores, to be consistent with the rest of the books.

Done!

I think it would be good to add redirects for the removed pages, otherwise there will be a lot of broken links. mdbook now supports that in book.toml. I think that should work, though the rust-lang linkchecker doesn't work well with it.

Done! Since most of that content no longer exists, I tried to map to the "closest relevant thing".

It also looks like there are a few errors and broken links here. Let me know if you want help with any of the above.

mdbook test passes now, if that's what you mean, although I mostly just ignored code examples. Maybe as we revise those chapters we can convert them into tests that actually run.

@nikomatsakis
Copy link
Contributor Author

I think this is ready to land, then.

@nikomatsakis

This comment has been minimized.

@ehuss
Copy link
Contributor

ehuss commented May 19, 2021

I pushed a commit to fix some of the links here: ehuss@8b6d2d1

I can push it to your branch, or you can maybe copy it if you want.

The CI was a little out of date. Links can't be absolute, since they would break when viewed from the filesystem. Also, I added redirects to pages that might be more relevant to the original content.

@nikomatsakis
Copy link
Contributor Author

@ehuss feel free to push to my branch!

@nikomatsakis
Copy link
Contributor Author

Thanks @ehuss! I'm going to go ahead and merge this then.

@nikomatsakis nikomatsakis merged commit 302a115 into rust-lang:master May 21, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request May 26, 2021
Update books

## reference

4 commits in 5aa457bf1b54bd2cd5d4cf49797f29299bdf89a7..9c68af3ce6ccca2395e1868addef26a0542e9ddd
2021-05-05 08:39:22 -0700 to 2021-05-24 09:53:32 -0700
- missing parameter name in Trait Implementations (rust-lang/reference#1030)
- Add more content to impl-trait.md (rust-lang/reference#1017)
- Document extended key-value attributes (rust-lang/reference#1029)
- Document raw pointer <-> usize casts. (rust-lang/reference#970)

## rust-by-example

1 commits in 5f8c6da200ada77760a2fe1096938ef58151c9a6..805e016c5792ad2adabb66e348233067d5ea9f10
2021-04-29 08:08:01 -0300 to 2021-05-20 17:08:34 -0300
- Update structs.md (rust-lang/rust-by-example#1440)

## rustc-dev-guide

4 commits in 1e6c7fbda4c45e85adf63ff3f82fa9c870b1447f..50de7f0682adc5d95ce858fe6318d19b4b951553
2021-05-10 13:38:24 +0900 to 2021-05-20 15:02:20 +0200
- update rustfmt references to reflect change from submod to subtree (rust-lang/rustc-dev-guide#1129)
- Remove `--stage 1` argument from `doc` invocations (rust-lang/rustc-dev-guide#1125)
- Update coverage docs (rust-lang/rustc-dev-guide#1122)
- Document -Zunpretty=thir-tree (rust-lang/rustc-dev-guide#1128)

## edition-guide

1 commits in 1da3c411f17adb1ba5de1683bb6acee83362b54a..302a115e8f71876dfc884aebb0ca5ccb02b8a962
2021-02-16 16:46:40 -0800 to 2021-05-21 10:46:11 -0400
- Minimize the edition guide (rust-lang/edition-guide#232)

## embedded-book

1 commits in 569c3391f5c0cc43433bc77831d17f8ff4d76602..7349d173fa28a0bb834cf0264a05286620ef0923
2021-04-07 08:32:11 +0000 to 2021-05-25 13:59:05 +0000
- Remove $ from cargo-binutils  (rust-embedded/book#292)
JohnTitor added a commit to JohnTitor/rust that referenced this pull request May 26, 2021
Update books

## reference

4 commits in 5aa457bf1b54bd2cd5d4cf49797f29299bdf89a7..9c68af3ce6ccca2395e1868addef26a0542e9ddd
2021-05-05 08:39:22 -0700 to 2021-05-24 09:53:32 -0700
- missing parameter name in Trait Implementations (rust-lang/reference#1030)
- Add more content to impl-trait.md (rust-lang/reference#1017)
- Document extended key-value attributes (rust-lang/reference#1029)
- Document raw pointer <-> usize casts. (rust-lang/reference#970)

## rust-by-example

1 commits in 5f8c6da200ada77760a2fe1096938ef58151c9a6..805e016c5792ad2adabb66e348233067d5ea9f10
2021-04-29 08:08:01 -0300 to 2021-05-20 17:08:34 -0300
- Update structs.md (rust-lang/rust-by-example#1440)

## rustc-dev-guide

4 commits in 1e6c7fbda4c45e85adf63ff3f82fa9c870b1447f..50de7f0682adc5d95ce858fe6318d19b4b951553
2021-05-10 13:38:24 +0900 to 2021-05-20 15:02:20 +0200
- update rustfmt references to reflect change from submod to subtree (rust-lang/rustc-dev-guide#1129)
- Remove `--stage 1` argument from `doc` invocations (rust-lang/rustc-dev-guide#1125)
- Update coverage docs (rust-lang/rustc-dev-guide#1122)
- Document -Zunpretty=thir-tree (rust-lang/rustc-dev-guide#1128)

## edition-guide

1 commits in 1da3c411f17adb1ba5de1683bb6acee83362b54a..302a115e8f71876dfc884aebb0ca5ccb02b8a962
2021-02-16 16:46:40 -0800 to 2021-05-21 10:46:11 -0400
- Minimize the edition guide (rust-lang/edition-guide#232)

## embedded-book

1 commits in 569c3391f5c0cc43433bc77831d17f8ff4d76602..7349d173fa28a0bb834cf0264a05286620ef0923
2021-04-07 08:32:11 +0000 to 2021-05-25 13:59:05 +0000
- Remove $ from cargo-binutils  (rust-embedded/book#292)
tatsuya6502 added a commit to tatsuya6502/edition-guide that referenced this pull request Nov 3, 2021
Change the chapter organization and remove some pages by following this
pull-request in the English version:
rust-lang/edition-guide#232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants