1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-12-20 14:25:37 +02:00
Commit Graph

253 Commits

Author SHA1 Message Date
michael-kerscher
6e862543d2 GitHub actions separate web tests (#2963)
Separating the web-tests from building the tests makes it more easy to
spot and override failing web-tests.

This is still testing only the English translation.

There are legitimate warnings coming out of the web-test infrastructure
and should be blocking. But sometimes the tests fail and need to be
overridden.
2025-10-30 10:21:59 +01:00
michael-kerscher
d1899de233 tests: Migrate create_slide.list.sh into cargo xtask function. (#2957)
The new xtask function makes the helper code
- more readable
- more reliable due to better error checking
- be in the same place as other helper functions
- and more aligned to the skillset relevant for contributing in this
repository.

The shell script grew and was not readable for everyone anymore without
deeper knowledge.

mitigates #2941 in a more reliable way but does still not fully fix the
root cause
2025-10-29 18:15:21 +01:00
michael-kerscher
a5e68972c2 Reduce permissions for Github actions by reducing to minimal permissions (#2961)
This is increasing the security of this repository. A standard
GITHUB_TOKEN currently has these permissions.

GITHUB_TOKEN Permissions
  Contents: read
  Metadata: read
  Packages: read

Setting only `contents: read` permission has the effect of removing
Packages permission. Metadata is added automatically.

fixes #2958
2025-10-29 14:37:13 +01:00
Martin Geisler
1063356a1d Re-enable the red box to show available space (#2932)
Way back in #187, I introduced a hacky tool to show the available space
on a slide: it was a `mdbook` plugin which injected the necessary CSS on
each slide. Crude, but it got the job done.

The logic was moved from Python to a real CSS file with associated
JavaScript in #1842. In #1917, the functionality was moved to a
dedicated “instructor menu”, together with functionality for saving the
state of the Playground on each slide.

Unfortunately, the whole thing was disabled in #1935 since I found that
the Playgrounds lost their code with the saving logic. I was also not
100% happy with dedicating space on each slide for a menu only used by
instructors.

However, I really think we need a tool to let slide editors know about
the available space, so I would like to re-introduce the red box. This
time via a keyboard shortcut to make it easy to toggle as needed.

I’m suggesting enabling this for everyone, with the expectation that
most people won’t find the shortcut and will quickly disable the box if
they do (there is a dedicated button to hide it again).

End-to-end tests have been added for the new functionality.
2025-10-19 15:10:01 +00:00
dependabot[bot]
9fcca2f346 build(deps): bump actions/setup-node from 4 to 5 (#2937)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4
to 5.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 10:18:36 +00:00
dependabot[bot]
6375ab05b6 build(deps): bump actions/labeler from 5 to 6 (#2938)
Bumps [actions/labeler](https://github.com/actions/labeler) from 5 to 6.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 10:17:44 +00:00
dependabot[bot]
6758b454fe build(deps): bump crate-ci/typos from 1.35.7 to 1.37.0 (#2939)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.35.7 to
1.37.0.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Walbran <qwandor@google.com>
2025-10-06 10:12:00 +00:00
Martin Geisler
17a04070ed Don’t automatically install recommended packages (#2923)
Co-authored-by: Michael Kerscher <kerscher@google.com>
2025-10-01 20:33:48 +00:00
Martin Geisler
11f2831933 Optimize apt update calls (#2916)
This introduces a new local GitHub action for installing Debian
packages. I noticed that it often takes several minutes to install a few
small packages, and a large part of that time is spent updating the man
page database:

    2025-09-20T11:39:25.3001853Z Setting up yapf3 (0.33.0-1) ...
2025-09-20T11:39:25.3045329Z Processing triggers for libc-bin
(2.39-0ubuntu8.5) ...
2025-09-20T11:39:25.4420933Z Processing triggers for man-db
(2.12.0-4build2) ...
2025-09-20T11:41:42.8522570Z Processing triggers for install-info
(7.1-3build2) ...

Excluding the documentation files should make the man-db run much
faster. Compare these two runs:

*
[Before](https://github.com/google/comprehensive-rust/actions/runs/17879390708/job/50845084995):
2m 41s.
*
[After](https://github.com/google/comprehensive-rust/actions/runs/17880418155/job/50847334471):
11s.
2025-09-22 09:33:42 +02:00
Martin Geisler
1e3be175fa Introduce a cargo clippy run (#2025)
This might help catch stylistic problems in our Rust code.

Related to #2587.
2025-09-20 11:38:54 +00:00
michael-kerscher
f4a11a4fc5 Speed up rust crate installs in workflow by using cargo-binstall (#2915)
When cargo xtask install-tools --binstall is used, precompiled binaries
are fetched if available.
Triggers a regular (compilation) install if binary releases do not
exist.

This is now configured to be used by the CI to speed up the build and
deploy workflows where possible.

Currently binary packages exist for:
- mdbook
- mdbook-pandoc
2025-09-19 13:28:03 +02:00
Luciefer
4731acf53f ci: use pinned nightly rustfmt to make unstable features take effect (#2896)
## What does this PR do?

This PR extends the existing `format` job in
`.github/workflows/build.yml` to
**check Rust formatting with nightly `rustfmt`**:

**Closes #2794**
2025-09-10 13:36:47 +02:00
dependabot[bot]
5e2859fca3 Bump crate-ci/typos from 1.34.0 to 1.35.7 (#2865)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.34.0 to
1.35.7.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-01 13:07:04 +01:00
dependabot[bot]
fe43ce5a01 Bump actions/upload-pages-artifact from 3 to 4 (#2864)
Bumps
[actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact)
from 3 to 4.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-01 10:41:16 +01:00
dependabot[bot]
f1de2fda36 Bump actions/checkout from 4 to 5 (#2863)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to
5.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-01 10:40:44 +01:00
Yiğit Rahim Kuru
697054c301 Added new reviewer for Turkish translation (#2831)
Hello, I would like to support the translation of Rust into Turkish in
order to promote it in Turkey. As I saw in the previous PRs, we need to
add our own name here, so I am opening a PR in this regard. I hope it
will have a positive outcome (I know I opened the PR with the wrong
name, I'm sorry).
2025-07-27 19:44:51 +03:00
Enes Aydın
059b44bf35 Update CODEOWNERS (#2817)
I missed the invitation that was discussed in #1999. That's why I was
deleted from here later. I added myself again.
2025-07-13 19:30:25 +00:00
dependabot[bot]
30e3151f56 Bump crate-ci/typos from 1.33.1 to 1.34.0 (#2798)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.33.1 to
1.34.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:14:56 +01:00
dependabot[bot]
9599e3f7fb Bump dprint/check from 2.2 to 2.3 (#2797)
Bumps [dprint/check](https://github.com/dprint/check) from 2.2 to 2.3.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:13:38 +01:00
Dustin J. Mitchell
ab26027a79 Fix errors in CODEOWNERS as suggested by GH (#2771) 2025-06-03 15:58:44 +00:00
dependabot[bot]
3eb9f98f4a Bump crate-ci/typos from 1.32.0 to 1.33.1 (#2769)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.32.0 to
1.33.1.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 14:45:41 +01:00
Dustin J. Mitchell
0c20fb11f1 Convert dependabot reviewers to CODEOWNERS (#2762)
See
https://github.blog/changelog/2025-04-29-dependabot-reviewers-configuration-option-being-replaced-by-code-owners/.
2025-06-03 14:16:53 +01:00
dependabot[bot]
f3e369274a Bump crate-ci/typos from 1.31.2 to 1.32.0 (#2761)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.31.2 to
1.32.0.
2025-06-01 20:12:49 -04:00
Andrew Walbran
a0e1add083 Add more tools to install instructions. (#2756)
Install mdbook-linkcheck2 via xtask, rather than separate step.
2025-05-23 21:16:57 +01:00
Andrew Walbran
fc6e5c7526 Update to Rust 2024 edition. (#2658) 2025-05-23 19:03:03 +01:00
michael-kerscher
ab1a470ab2 workflow: enable npm caching and update node to LTS version 22 (#2726)
node version 18 is EOL  https://nodejs.org/en/about/previous-releases
node version 22 is the new LTS release 
The caching is done to make the tests less brittle in addition to only
setup for the english translation
There have been failed tests because npm install encountered network
issues while downloading packages.
2025-05-01 21:17:44 +03:00
dependabot[bot]
3fe4addb54 Bump crate-ci/typos from 1.31.1 to 1.31.2 (#2729)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.31.1 to
1.31.2.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 11:41:28 +01:00
Martin Geisler
ec75f8f8ab Document translation workflow (#2579)
This documents the documentation workflow.
2025-04-23 08:24:30 +00:00
dependabot[bot]
bab66c5d43 Bump crate-ci/typos from 1.29.10 to 1.31.1 (#2698)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.10
to 1.31.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.31.1</h2>
<h2>[1.31.1] - 2025-03-31</h2>
<h3>Fixes</h3>
<ul>
<li><em>(dict)</em> Also correct <code>typ</code> to
<code>type</code></li>
</ul>
<h2>v1.31.0</h2>
<h2>[1.31.0] - 2025-03-28</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1266">March
2025</a> changes</li>
</ul>
<h2>v1.30.3</h2>
<h2>[1.30.3] - 2025-03-24</h2>
<h3>Features</h3>
<ul>
<li>Support detecting <code>go.work</code> and <code>go.work.sum</code>
files</li>
</ul>
<h2>v1.30.2</h2>
<h2>[1.30.2] - 2025-03-10</h2>
<h3>Features</h3>
<ul>
<li>Add <code>--highlight-words</code> and
<code>--highlight-identifiers</code> for easier debugging of config</li>
</ul>
<h2>v1.30.1</h2>
<h2>[1.30.1] - 2025-03-04</h2>
<h3>Features</h3>
<ul>
<li><em>(action)</em> Create <code>v1</code> tag</li>
</ul>
<h2>v1.30.0</h2>
<h2>[1.30.0] - 2025-03-01</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1221">February
2025</a> changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.31.1] - 2025-03-31</h2>
<h3>Fixes</h3>
<ul>
<li><em>(dict)</em> Also correct <code>typ</code> to
<code>type</code></li>
</ul>
<h2>[1.31.0] - 2025-03-28</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1266">March
2025</a> changes</li>
</ul>
<h2>[1.30.3] - 2025-03-24</h2>
<h3>Features</h3>
<ul>
<li>Support detecting <code>go.work</code> and <code>go.work.sum</code>
files</li>
</ul>
<h2>[1.30.2] - 2025-03-10</h2>
<h3>Features</h3>
<ul>
<li>Add <code>--highlight-words</code> and
<code>--highlight-identifiers</code> for easier debugging of config</li>
</ul>
<h2>[1.30.1] - 2025-03-04</h2>
<h3>Features</h3>
<ul>
<li><em>(action)</em> Create <code>v1</code> tag</li>
</ul>
<h2>[1.30.0] - 2025-03-01</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1221">February
2025</a> changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b1a1ef3893"><code>b1a1ef3</code></a>
chore: Release</li>
<li><a
href="9c8a2c384f"><code>9c8a2c3</code></a>
docs: Update changelog</li>
<li><a
href="12195d75fe"><code>12195d7</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1267">#1267</a>
from epage/type</li>
<li><a
href="d4dbe5f77b"><code>d4dbe5f</code></a>
fix(dict): Also correct typ to type</li>
<li><a
href="718c4ff697"><code>718c4ff</code></a>
chore: Release</li>
<li><a
href="bfbf137ed6"><code>bfbf137</code></a>
chore: Release</li>
<li><a
href="d47e90e4ff"><code>d47e90e</code></a>
docs: Update changelog</li>
<li><a
href="0694c2a982"><code>0694c2a</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1266">#1266</a>
from epage/march</li>
<li><a
href="f715ca8b08"><code>f715ca8</code></a>
feat(dict): March 2025 updates</li>
<li><a
href="d08e4083f1"><code>d08e408</code></a>
chore: Release</li>
<li>Additional commits viewable in <a
href="https://github.com/crate-ci/typos/compare/v1.29.10...v1.31.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.29.10&new-version=1.31.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-01 12:07:14 -04:00
michael-kerscher
53f7660e9b Evaluate slide size and block if they grow above a certain treshold (with exemption mechanism) (#2693)
This enables a test for the width and height of slides (excluding some
special cases completely).
The mechanism has an exemption mechanism to temporarily exempt slides
from the rules.
Even exempted slides are checked for the rule violation and once the
slides are compliant they must be removed from the exemption list to
avoid future regression (the check fails in the CI if compliant slides
are exempted!)

This also provides a good opportunity to always have an up-to-date list
of overlong slides in
[slide-exemptions.list.ts](tests/src/slides/slide-exemptions.list.ts)
that can be worked on.

The slide list is always autogenerated in the CI environment. If you want to
enable this for your local dev environment it has to be created manually.
This avoids a time consuming local test if it is not necessary.

On the CLI it can be locally used with `npm run test --
--spec=src/slide-size.test.ts` (after creating the list with
`./src/slides/create-slide.list.sh ../book/html/`).
The CI environment specifies the env var `TEST_BOOK_DIR` that is used to
specifiy the html directory so it can create the list of slides
on-the-fly, check against hardcoded exemptions and evaluate.

This is a new solution for #1464 within the new test framework. This is
related to #2234 and makes the mdbook-slide-evaluator from #2258
obsolete and should be removed as this is a not so powerful nor flexible
framework.
2025-03-18 12:50:46 +01:00
Eric Githinji
91f6de64df Xtask (#2688)
### Background
Comprehensive Rust requires a number of tools to be installed (e.g.
mdbook and mdbook-course). As mentioned in #2509 (and discussed in
#2469) it would be nice to have a cross platform command for installing
these dependencies. Currently these are installed using a shell script
(`install-mdbook.sh`) but this isn't truly cross platform e.g. for
Windows users.

### Xtask

[xtask](https://github.com/matklad/cargo-xtask) outlines an approach for
automating tasks in a Rust project. It involves using cargo's aliasing
feature to allow us to run commands like `cargo xtask <some task>` to
perform adhoc tasks via a Rust binary that we might otherwise need a
shell script for.

In this PR we add support for a `cargo xtask install-tools` command that
will replace the `install-mdbook.sh` script and install the dependent
tools. We can potentially extend it to support for other tasks e.g.
`cargo xtask fmt`.

---------

Co-authored-by: Eric Githinji <egithinji@google.com>
2025-03-14 12:24:08 +01:00
명이
9d7ae61322 Correct incorrect title of Korean translation (#2599)
I fixed some wrong titles in the Korean translation
2025-03-07 12:04:50 +01:00
dependabot[bot]
c48b9ec3be Bump crate-ci/typos from 1.29.5 to 1.29.10 (#2686)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.5 to
1.29.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.29.10</h2>
<h2>[1.29.10] - 2025-02-25</h2>
<h3>Fixes</h3>
<ul>
<li>Also correct <code>contaminent</code> as
<code>contaminant</code></li>
</ul>
<h2>v1.29.9</h2>
<h2>[1.29.9] - 2025-02-20</h2>
<h3>Fixes</h3>
<ul>
<li><em>(action)</em> Correctly get binary for some aarch64 systems</li>
</ul>
<h2>v1.29.8</h2>
<h2>[1.29.8] - 2025-02-19</h2>
<h3>Features</h3>
<ul>
<li>Attempt to build Linux aarch64 binaries</li>
</ul>
<h2>v1.29.7</h2>
<h2>[1.29.7] - 2025-02-13</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>implementors</code></li>
</ul>
<h2>v1.29.6</h2>
<h2>[1.29.6] - 2025-02-13</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1200">January
2025</a> changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.29.10] - 2025-02-25</h2>
<h3>Fixes</h3>
<ul>
<li>Also correct <code>contaminent</code> as
<code>contaminant</code></li>
</ul>
<h2>[1.29.9] - 2025-02-20</h2>
<h3>Fixes</h3>
<ul>
<li><em>(action)</em> Correctly get binary for some aarch64 systems</li>
</ul>
<h2>[1.29.8] - 2025-02-19</h2>
<h3>Features</h3>
<ul>
<li>Attempt to build Linux aarch64 binaries</li>
</ul>
<h2>[1.29.7] - 2025-02-13</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>implementors</code></li>
</ul>
<h2>[1.29.6] - 2025-02-13</h2>
<h3>Features</h3>
<ul>
<li>Updated the dictionary with the <a
href="https://redirect.github.com/crate-ci/typos/issues/1200">January
2025</a> changes</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="db35ee91e8"><code>db35ee9</code></a>
chore: Release</li>
<li><a
href="9f43c4dbd2"><code>9f43c4d</code></a>
docs: Update changelog</li>
<li><a
href="a1da2ce137"><code>a1da2ce</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1244">#1244</a>
from epage/containment</li>
<li><a
href="d74d5fd5ad"><code>d74d5fd</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1243">#1243</a>
from epage/dict</li>
<li><a
href="fa6122604f"><code>fa61226</code></a>
refactor(dict): Drop a dict</li>
<li><a
href="6276d585f7"><code>6276d58</code></a>
fix(dict): Correct contaminents to another spelling</li>
<li><a
href="07c9e1f6fa"><code>07c9e1f</code></a>
chore(deps): Update Rust Stable to v1.85 (<a
href="https://redirect.github.com/crate-ci/typos/issues/1241">#1241</a>)</li>
<li><a
href="71643b1191"><code>71643b1</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1240">#1240</a>
from szepeviktor/patch-1</li>
<li><a
href="931a5804a4"><code>931a580</code></a>
Fix typo in README</li>
<li><a
href="c5137fd6aa"><code>c5137fd</code></a>
refactor(action): Isolate unique parts</li>
<li>Additional commits viewable in <a
href="https://github.com/crate-ci/typos/compare/v1.29.5...v1.29.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.29.5&new-version=1.29.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-03 13:19:01 +01:00
michael-kerscher
715a23e7a8 Create install-mdbook.sh and lock to the current versions used in the CI (#2626)
Move mdbook installation into a script and use exact versions from the
CI.
Update README.md to instruct developers to use the same versions as the
CI to sync both environments.
This is related to #2620 and it fixes #2588
2025-02-05 15:33:28 +01:00
dependabot[bot]
9821e811f4 Bump crate-ci/typos from 1.29.0 to 1.29.5 (#2612)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.0 to
1.29.5.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:13:54 +00:00
Max Heller
bcbe6b0876 Fix incorrectly hidden lines in Rust code blocks in PDFs (#2565)
Upgrades `mdbook-pandoc` to pull in a fix relating to hidden lines in
Rust code blocks. The bug was causing lines like `#[test]` to be hidden
when they should not have been.

## HTML
<img width="500" alt="Screenshot 2025-01-18 at 12 50 26 PM"
src="https://github.com/user-attachments/assets/c3363696-6ab6-4537-8285-fad047cb384f"
/>

## PDF (before)
<img width="500" alt="Screenshot 2025-01-18 at 12 51 25 PM"
src="https://github.com/user-attachments/assets/19539a9b-db24-41c5-98be-87d5a6228423"
/>

## PDF (after)
<img width="500" alt="Screenshot 2025-01-18 at 12 52 25 PM"
src="https://github.com/user-attachments/assets/b19f1e6c-d717-449e-8799-c56d9b5401ca"
/>
2025-01-19 01:45:22 -05:00
Max Heller
9493a8deb7 Fix missing images and Arabic fonts in course PDFs (#2544)
Let's give #2531 another try
- Fixes missing images in PDFs (those specified as <img> elements)
- Configures Arabic fonts

[The
fix](https://github.com/max-heller/mdbook-pandoc/pull/144/files#diff-b17b0f99aa22ee1ccf99778ca74c3c7a27af87f41544194cc95f82c012e8a507)
for the Persian translation issue, if you're curious.
2025-01-14 17:23:30 +01:00
kweber
0c91136396 de: synchronize the German translation (#2543)
I want to contribute to German translation, so i set up the complete
toolchain and git project for proper operation. This is my initial
commit to verify, that all is correct and i can continue.
2025-01-14 11:00:30 +01:00
michael-kerscher
34920c76e6 tests: hello world playground run with success and failure tests (#2513)
Implement two tests for the rust playground:
- successful run of the hello world example with the hello world message
in stdout and a hidden stderr
- on purpose compilation error is shown in stderr and "No output" in
stdout
2025-01-14 10:44:23 +01:00
Martin Geisler
76e2cfe53e Revert "Upgrade mdbook-pandoc to fix missing images in PDFs" (#2540)
Reverts google/comprehensive-rust#2531

This accidentally broke the build because the Persian translation
doesn't build with this version.
2025-01-05 11:15:20 -05:00
Max Heller
d4cc29ff0e Upgrade mdbook-pandoc to fix missing images in PDFs (#2531)
[`mdbook-pandoc`
0.8](https://github.com/max-heller/mdbook-pandoc/releases/tag/v0.8.0)
now supports `<img>` elements in raw HTML, fixing a few missing images
in the PDF versions of the course.
2025-01-02 08:52:42 +00:00
dependabot[bot]
3ffd55ca52 Bump crate-ci/typos from 1.28.1 to 1.29.0 (#2536)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.28.1 to
1.29.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 09:34:59 +01:00
michael-kerscher
48b2b5c312 Add a test framework to test the JS part of the course (#2471)
This is a first draft for a test framework for testing the JS part of
the book that is discussed in #2462

It is using [webdriverIO](https://webdriver.io/) and the webdriverIO
[Expect API](https://webdriver.io/docs/api/expect-webdriverio/) in
combination with [Mocha](https://mochajs.org/). WebdriverIO is taking
care of accessing the webpage with a real browser and can access the
state of the page so behavior can be asserted.

Currently only a small test for the speaker-notes implementation demos
the functionality.

The [Static Server
Service](https://webdriver.io/docs/static-server-service/) is used to
serve the book in a way that the test runner can access it.

A CI integration can look like https://webdriver.io/docs/githubactions/
and is implemented with a headless setup. In CI it uses the language
variable to set environment variable that configures where the built
book should be mounted from

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2024-12-04 09:06:58 +00:00
dependabot[bot]
bf8e642bcf build(deps): bump crate-ci/typos from 1.26.8 to 1.28.1 (#2485)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.26.8 to
1.28.1.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-01 20:41:39 +00:00
Martin Geisler
7f59978a0a Update Rust before setting up the cache (#2460)
The cache is keyed on the Rust version used, so we should update Rust
before setting up the cache.

This is a small update to #2449.
2024-11-12 10:26:42 +01:00
dependabot[bot]
5a57631911 build(deps): bump crate-ci/typos from 1.24.6 to 1.26.8 (#2451)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.24.6 to
1.26.8.
2024-11-01 13:54:06 +00:00
Andrew Walbran
f8882190f3 Updates for Rust 1.82 (#2449)
Rust 1.82 adds `&raw` expressions, and marks some attributes as unsafe.
2024-11-01 08:39:56 +01:00
dependabot[bot]
259220ba88 build(deps): bump crate-ci/typos from 1.24.3 to 1.24.6 (#2389)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.24.3 to
1.24.6.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:00:39 +01:00
Martin Geisler
a1e7f728c4 Lower dependabot frequency to monthly (#2329)
We are not super dependent on using the latest patch releases of every
crate, so a monthly update frequency should be more than enough.

Note that we still get PRs if/when there is a [security
update](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval).
2024-09-02 17:21:02 +02:00
dependabot[bot]
5f51537c3e build(deps): bump crate-ci/typos from 1.24.1 to 1.24.3 (#2342)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.24.1 to
1.24.3.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 10:06:33 +01:00