-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 TRPL to add new Chapter 17: Async and Await #131859
Conversation
|
This comment has been minimized.
This comment has been minimized.
All right, this is going to be fun to sort out. 😂 In the book crate, the CI run explicitly handles making sure |
I'm not quite sure I understand, but I don't see a problem depending on tokio in this repo. It's in the lock file already: Line 5332 in d9c4b8d
|
@Noratrieb Oh, well, that definitely simplifies things a bit then! I had missed that it was there. I just didn’t want to go adding it needlessly, given it is large! We do depend on a specific version in the book repo, but I think that will probably be Fine™ once I get the other bits around the build pipeline sorted out. Long story short: For the new chapter on async, we built a small crate, I am currently digging into the spot we invoke (That said, if people have better suggestions on how to do this here, I am all ears!) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a242ded
to
b71d6b9
Compare
This comment has been minimized.
This comment has been minimized.
Another thing we should probably include here is to add trpl as an unused dependency in Let me know if you run into any major roadblocks. I dropped the book update from #132007. |
b71d6b9
to
da710c8
Compare
This comment has been minimized.
This comment has been minimized.
da710c8
to
206b688
Compare
This comment has been minimized.
This comment has been minimized.
206b688
to
358f14b
Compare
The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging. |
This comment has been minimized.
This comment has been minimized.
358f14b
to
76f6be9
Compare
This comment has been minimized.
This comment has been minimized.
76f6be9
to
e4c2b0f
Compare
This comment has been minimized.
This comment has been minimized.
e4c2b0f
to
0290c20
Compare
This comment has been minimized.
This comment has been minimized.
Update TRPL to add new Chapter 17: Async and Await - Add support to `rustbook` to pass through the `-L`/`--library-path` flag to `mdbook` so that references to the `trpl` crate - Build the `trpl` crate as part of the book tests. Make it straightforward to add other such book dependencies in the future if needed by implementing that in a fairly general way. - Update the submodule for the book to pull in the new chapter on async and await, as well as a number of other fixes. This will happen organically/automatically in a week, too, but this lets me group this change with the next one: - Update the compiler messages which reference the existing chapters 17–20, which are now chapters 18-21. There are only two, both previously referencing chapter 18. - Update the UI tests which reference the compiler message outputs.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127483 (Allow disabling ASan instrumentation for globals) - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin) - rust-lang#132949 (Add specific diagnostic for using macro_rules macro as attribute/derive) - rust-lang#133247 (Reduce integer `Display` implementation size) - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns) - rust-lang#133332 (Mark `<[T; N]>::as_mut_slice` with the `const` specifier.) - rust-lang#133366 (Remove unnecessary bool from `ExpectedFound::new`) Failed merges: - rust-lang#131859 (Update TRPL to add new Chapter 17: Async and Await) r? `@ghost` `@rustbot` modify labels: rollup
@bors r- (needs a rebase) |
This also incorporates a number of other changes and fixes which would normally have been part of the automatic update, but which were blocked from landing because of the changes required to support shipping a crate as part of the chapter, along with those changes.
With the insertion of a new chapter 17 on async and await to _The Rust Programming Language_, references in compiler output to later chapters need to be updated to avoid confusing users. Redirects exist so that users who click old links will end up in the right place anyway, but this way users will be directed to the right URL in the first place.
This makes it possible to test an mdbook which has dependencies other than the direct crate for the book itself, e.g. the `trpl` crate used in _The Rust Programming Language_.
Since TRPL now depends on a `trpl` crate, the test needs to be able to build that crate to run mdbook against it, and also to invoke mdbook with `--library-path` in that case. Use the support for that flag added to `rustbook` in the previous change to invoke it with the path to the dependencies it will need to run `rustdoc` tests which reference `trpl`. Co-authored-by: Onur Özkan <onurozkan.dev@outlook.com>
Without this change: $ ./x test --set build.vendor=true src/doc/book # (lots of output) error: failed to select a version for the requirement `futures = "^0.3"` (locked to 0.3.30) candidate versions found which didn't match: 0.3.31, 0.3.27 location searched: directory source `/Users/chris/dev/rust-lang/rust/vendor` (which is replacing registry `crates-io`) required by package `trpl v0.2.0 (/Users/chris/dev/rust-lang/rust/src/doc/book/packages/trpl)` perhaps a crate was updated and forgotten to be re-vendored? Build completed unsuccessfully in 0:01:19 With this change: $ ./x test --set build.vendor=true src/doc/book # (lots of build output) Testing stage1 mdbook src/doc/book (aarch64-apple-darwin) finished in 86.949 seconds Build completed successfully in 0:04:05 # Conflicts: # src/bootstrap/src/core/build_steps/vendor.rs
30f9f60
to
7630b49
Compare
@jieyouxu I rebased. |
I guess the p didn't work... |
☀️ Test successful - checks-actions |
Update TRPL to add new Chapter 17: Async and Await - Add support to `rustbook` to pass through the `-L`/`--library-path` flag to `mdbook` so that references to the `trpl` crate - Build the `trpl` crate as part of the book tests. Make it straightforward to add other such book dependencies in the future if needed by implementing that in a fairly general way. - Update the submodule for the book to pull in the new chapter on async and await, as well as a number of other fixes. This will happen organically/automatically in a week, too, but this lets me group this change with the next one: - Update the compiler messages which reference the existing chapters 17–20, which are now chapters 18-21. There are only two, both previously referencing chapter 18. - Update the UI tests which reference the compiler message outputs.
Finished benchmarking commit (e48241b): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (secondary -3.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 4.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 797.977s -> 797.356s (-0.08%) |
rustbook
to pass through the-L
/--library-path
flag tomdbook
so that references to thetrpl
cratetrpl
crate as part of the book tests. Make it straightforward to add other such book dependencies in the future if needed by implementing that in a fairly general way.