Commit Graph

25 Commits

Author SHA1 Message Date
Chris Krycho
be84fe8322 infra: change how packages are opted out of workspaces
The `trpl`, `mdbook-trpl-note`, and `mdbook-trpl-listing` crates should
*never* be part of a host workspace: neither in `rust-lang/book` nor in
`rust-lang/rust`. They are always built as independent packages, so they
do not end up depending implicitly on the host’s workspace dependencies.

Accordingly, opt out by setting an empty `[workspace]` key in each of
the packages' `Cargo.toml` files so that they do not have to be
configured in both places they might be used.
2024-10-25 15:26:31 -06:00
Chris Krycho
068f30b406 Ch 17.02: motivating futures::join! and Box::pin
Up to this point, the chapter has stuck to `join` and `join3`, as simple
function-based APIs. The `join_all` API is obviously more convenient
than those *if you can use it*, but being able to use it requires having
something which `impl Iterator` of a given type, and therefore demands a
homogeneous type, which motivates introducing `Box::pin`.

That in turn is quite annoying to work with and requires `Output =
<same>` for all the futures in the collection, because of how `join_all`
is typed (Rust does not have the ability to do do variadic types, which
is what would be necessary for `join_all` to work the way we might
want). Thus, we get a motivation for `futures::join!`, which unlike
`join_all` *can* work with heterogeneous types.

This fills out a fair bit of the text here and adds a lot of the listing
support, and outlines what remains to do text-wise.
2024-06-12 13:42:09 -06:00
Chris Krycho
548329994b Exclude trpl from workspace
It should manage its own dependencies.
2024-06-12 13:42:09 -06:00
Chris Krycho
48909a19ac infra: more workspace cleanup
- Turn back on `default-members`.
- Remove deps from root only used by mdbook preprocessors, since they
  are managed by themselves now.
2024-05-22 13:26:53 -06:00
Carol (Nichols || Goulding)
a22a6b42b1 Exclude tmp dir from the workspace
This is where the tools/update-rustc.sh script builds listings for the
purposes of updating commands' output.
2024-05-22 14:52:49 -04:00
Chris Krycho
efd315a348 infra: remove mdBook preprocessors from workspace
Remove these from the workspace, because they will need to be used as
path dependencies in `rust-lang/rust`, as part of the build, because the
Rust build pipeline invokes mdBook programmatically rather than via
tools built directly, and we really don’t want to muck with publishing
these to crates.io at present. As a result, they cannot be part of this
workspace, because path dependencies do not get built as a crate within
the hosting workspace. Make sure they do not rely on any features other
than the core `mdbook` library.
2024-05-22 07:28:29 -06:00
Chris Krycho
3254856510 infra: Hoist mdBook preprocessor workspace dependencies 2024-05-14 07:50:10 -06:00
Chris Krycho
d4c69fd881 Fix workspace behavior by excluding listings
At some point we may want to include these in the workspace, but for
now they need to be excluded so `cargo build` and `rust-analyzer` work
correctly with the workspace layout.
2024-05-09 12:38:54 -06:00
Chris Krycho
427f7d3b8f Update CI config for workspace and mdbook-trpl-note
- Add building `mdbook-trpl-note` to the relevant workflow.
- Explicitly exclude `linkcheck` from new workspace.
2024-04-29 16:18:34 -06:00
Chris Krycho
33fb62e92f Make mdbook a workspace root dependency 2024-04-29 16:18:34 -06:00
Chris Krycho
f48b281275 Convert to a workspace
This will let us pull in, and work directly on, things like the
`mdbook-trpl-notes` preprocessor.
2024-04-29 09:27:34 -06:00
Yuri Astrakhan
f55ac5d8fa Inline all format arguments
The inlined format arguments are a bit easier to understand,
especially for those familiar with the other languages (python, js).
2023-10-30 11:54:36 -04:00
Jade
1c4a1ea4bf Remove authors field from all the listing manifests
Since RFC3052 is fully implemented in Cargo and the various Rust
websites, we can set an example by removing the authors field from all
the listings as it has been effectively soft deprecated.

Follow on/related to #2785, which removed the references in the text.
2021-07-27 19:02:14 -07:00
Carol (Nichols || Goulding)
1340fd5097 Update docopt usage since we bumped major versions 2020-01-29 11:16:58 -05:00
Carol (Nichols || Goulding)
b61f234c9a update all our crates 2020-01-27 09:00:50 -05:00
Carol (Nichols || Goulding)
6579c05cb9 Include code without hidden lines for nostarch files 2020-01-20 15:40:15 -05:00
Carol (Nichols || Goulding)
8b0c2161f5 Script to generate release artifact of just the listings 2020-01-20 15:40:14 -05:00
Carol (Nichols || Goulding)
09c1fe6ab5 Alphabetize bins 2020-01-10 15:17:05 -05:00
Daniel Alley
b6621729a5 Add edition to Cargo.toml, use 2018 edition idoms
Ran "cargo fix --edition-idioms"
2018-12-16 22:56:38 -05:00
Steve Klabnik
1fedfc4b96 move the book to the top level 2018-11-20 13:45:05 -05:00
steveklabnik
4f2dc56485 move most stuff into second-edition 2017-03-03 11:45:16 -05:00
Carol (Nichols || Goulding)
466a74aebc Move rust tools out of book src dir 2016-10-14 14:42:35 -04:00
Aleksei Voronov
cfabd86e21 Add a script that concatenates chapters into one file
Closes #183
2016-08-16 00:40:12 +03:00
Carol (Nichols || Goulding)
7eb505d7a0 Add newlines to the ends of files 2016-08-10 19:14:25 -04:00
Eric D. Reichert
b331986493 Added initial file path linter. 2016-08-07 09:00:16 -04:00