Skip to content

Commit ea0d319

Browse files
authored
Merge pull request #885 from Kobzol/linkcheck
Add link checking on CI
2 parents b6a25cd + 8297747 commit ea0d319

15 files changed

+60
-33
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Deploy To GitHub Pages
22
on:
33
schedule:
44
- cron: '0 22 * * *'
5-
pull_request:
65
push:
76
branches:
87
- master
@@ -16,18 +15,15 @@ jobs:
1615
- uses: actions/checkout@v4
1716
- name: Install mdbook
1817
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
19-
- name: Check blacksmith format
20-
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
2118
- name: Build book
2219
run: ./mdbook build
2320
- name: Upload artifact
24-
if: github.ref == 'refs/heads/master'
2521
uses: actions/upload-pages-artifact@v3
2622
with:
2723
path: ./book
2824

2925
deploy:
30-
if: github.ref == 'refs/heads/master' && github.repository_owner == 'rust-lang'
26+
if: github.repository_owner == 'rust-lang'
3127
needs: build
3228

3329
permissions:

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
test:
7+
name: CI
8+
runs-on: ubuntu-latest
9+
env:
10+
MDBOOK_VERSION: 0.4.51
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Install mdbook
14+
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz
15+
- name: Install mdbook-linkcheck
16+
run: cargo install [email protected] --locked
17+
- name: Check blacksmith format
18+
run: cargo fmt --check --manifest-path=blacksmith/Cargo.toml
19+
- name: Build book
20+
run: ./mdbook build

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ you to easily see and update changes you make.
2424
mdbook serve
2525
```
2626

27+
## Link checking
28+
29+
On CI, we automatically check if all intra-doc links in the Forge Markdown files are valid. If you would like to
30+
perform this check locally, install `mdbook-linkcheck` using `cargo install [email protected] --locked` and then
31+
simply run `mdbook build` or `mdbook serve`.
32+
2733
## JavaScript
2834

2935
Forge uses JavaScript to display dates for releases and "no tools breakage

book.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ smart-punctuation = true
6161
"platforms/zulip/triagebot.html" = "/triagebot/index.html"
6262
"core/blogs.html" = "/platforms/blogs.html"
6363
"core/index.html" = "/governance/council.html"
64+
65+
[output.linkcheck]
66+
follow-web-links = false
67+
optional = true

src/compiler/cross-team-collaboration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ label to a issue (you can include `@rustbot label +I-compiler-nominated` in
1010
your comment to do this).
1111

1212
Once nominated, the issue will be discussed in a upcoming [triage
13-
meeting](./triage-meeting.html). The compiler team doesn't always get through
13+
meeting](./meetings.md#triage-meeting). The compiler team doesn't always get through
1414
all nominated issues each week, so it can take more than one meeting for your
1515
issue to be discussed.
1616

@@ -60,7 +60,7 @@ Add the `I-compiler-nominated` label to a issue (you can use `@rustbot label
6060
+I-compiler-nominated` to do this).
6161

6262
Once nominated, the issue will be discussed in a upcoming [triage
63-
meeting](./triage-meeting.html). The compiler team doesn't always get through
63+
meeting](./meetings.md#triage-meeting). The compiler team doesn't always get through
6464
all nominated issues each week, so it can take more than one meeting for your
6565
issue to be discussed. In the compiler team's discussion, the issue may..
6666

src/compiler/membership.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This team discusses membership in the compiler team. There are currently two lev
55
* maintainers: members who have committed themselves to invest in the quality of the compiler and
66
health of the compiler team
77

8-
[infrastructure]: ../infra/index.html
8+
[infrastructure]: ../infra/README.md
99

1010
## The path to membership
1111
People who are looking to contribute to the compiler typically start in one of two ways. They may
@@ -52,9 +52,8 @@ Being promoted to member implies a number of privileges:
5252
It also implies some obligations (in some cases, optional obligations):
5353

5454
- Members will be asked if they wish to be added to the reviewer rotation.
55-
- Members may take part in various other [maintainer activities] to help the team.
56-
- Members are held to a higher standard than ordinary folk when it comes to the [Code of
57-
Conduct][CoC].
55+
- Members may take part in various other maintainer activities to help the team.
56+
- Members are held to a higher standard than ordinary folk when it comes to the [Code of Conduct][CoC].
5857

5958
[listed]: https://www.rust-lang.org/governance/teams/compiler
6059

@@ -82,7 +81,7 @@ After being a compiler team member for a year, members can request or be asked t
8281
actively helping to shape the direction of the team or some part of the compiler (or multiple
8382
parts).
8483

85-
- Compiler team maintainers are expected to participate in at least one [maintenance activities].
84+
- Compiler team maintainers are expected to participate in at least one maintenance activities.
8685
- Compiler team maintainers are identified with the "Maintainer" role on the rust-lang website.
8786

8887
## How promotion decisions are made

src/compiler/prioritization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,5 @@ After the meeting, there are a few closing tasks:
217217
[forge_announce]: https://github.com/rust-lang/rust-forge/issues?q=label%3Afinished-final-comment-period+label%3Ato-announce
218218
[fcps]: https://github.com/rust-lang/compiler-team/issues?q=label%3Amajor-change+label%3Ato-announce
219219
[mcps]: https://github.com/rust-lang/compiler-team/issues?q=label%3Amajor-change+label%3Ato-announce
220-
[relese_backports]: ../release/backporting.md
220+
[release_backports]: ../release/backporting.md
221221
[compiler_nominated]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+label%3AI-compiler-nominated+label%3AT-compiler

src/compiler/proposals-and-stabilization.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ the nature of the proposal, described below.
6464

6565
[rust-lang/compiler-team]: https://github.com/rust-lang/compiler-team
6666
[design meeting proposal]: ./meetings.md#steeringplanning-meeting
67+
[major change template]: https://github.com/rust-lang/compiler-team/issues/new?template=major_change.md
6768

6869
#### What kinds of comments should go on a MCP in the compiler-team repo?
6970
Please direct technical conversation to the Zulip stream.
@@ -360,7 +361,7 @@ See [*Backports*](./backports.md).
360361

361362
### Adding ecosystem/integration test jobs/components to rust-lang/rust CI
362363

363-
See [*Adding ecosystem/integration test jobs/components to rust-lang/rust CI*](./proposals-and-stabilization/custom-test-jobs.md).
364+
See [*Adding ecosystem/integration test jobs/components to rust-lang/rust CI*](./proposals-and-stabilization/ecosystem-integration-tests.md).
364365

365366

366367
[stabilization_guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html

src/compiler/reviews.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,3 +497,4 @@ team](https://www.rust-lang.org/governance/teams/moderation) to step in.
497497

498498
[coc]: https://www.rust-lang.org/policies/code-of-conduct
499499
[rollup]: ../release/rollups.md
500+
[MCP]: ./proposals-and-stabilization.md#how-do-i-submit-an-mcp

src/compiler/third-party-out-of-tree.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in `rust-lang`) and that the experience is uniform across `rust-lang/rust` and t
1010
### When should parts of the compiler be extracted into an out-of-tree crate?
1111
This is left to the discretion of compiler team members but should be discussed with the rest of
1212
the team, either through raising the question at the weekly triage meeting or asynchronously using
13-
[an approval decision](./proposals-and-stabilizations.md). If the crate is a product of a working
13+
[an approval decision](./proposals-and-stabilization.md). If the crate is a product of a working
1414
group, there should already be agreement within the working group that an out-of-tree crate is
1515
suitable.
1616

@@ -123,9 +123,9 @@ In summary, the process for establishing an out-of-tree crate is as follows:
123123

124124
> This crate is developed and maintained by the [Rust compiler team](https://github.com/rust-lang/compiler-team/tree/master/procedures) for use within
125125
> `rustc`, in particular, it is the responsibility of the
126-
> [`.template`](../../working-groups/template) working group. This crate [will have regular
127-
> breaking changes and provides no stability guarantees|is intended to remain stable and have
128-
> limited breaking changes].
126+
> [`.template`](./working-areas.md) working area. This crate will have regular
127+
> breaking changes and provides no stability guarantees | is intended to remain stable and have
128+
> limited breaking changes.
129129
1. Include the [LICENSE-APACHE][apache] and [LICENSE-MIT][mit] files from `rust-lang/rust`.
130130
1. Include or link the [CODE_OF_CONDUCT][coc] file from `rust-lang/rust`.
131131
1. Create a relevant `.gitignore` ([here's a sane default][gitignore]).
@@ -137,7 +137,7 @@ In summary, the process for establishing an out-of-tree crate is as follows:
137137
[gitignore]: https://gitignore.io/api/vim,rust,emacs,clion,visualstudio,visualstudiocode
138138
[triagebot]: https://github.com/rust-lang/rust/blob/master/triagebot.toml
139139
[apache]: https://github.com/rust-lang/rust/blob/master/LICENSE-APACHE
140-
[coc]: ../../about/code_of_conduct
140+
[coc]: https://www.rust-lang.org/policies/code-of-conduct
141141
[mit]: https://github.com/rust-lang/rust/blob/master/LICENSE-MIT
142142

143143
## Third-party crates

src/compiler/working-areas.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
Much of the ongoing work and initiatives from the compiler team are performed by groups of people interested in specific areas of work. These groups are a great way for new contributors to get involved as they provide a stream of tasks focused around one area and have designated channels for help and advice. Here is a list of areas where work is being carried on:
44

5-
Name | Short Description | Code | Zulip Stream
6-
---- | ----------------- | ---------- | ------------
7-
Async-await Implementation | Implementing async-await | [Link][async-await_code] | [#wg-async][async-await_stream]
8-
Diagnostics | Use crates.io crates for diagnostics rendering and make emitting diagnostics nicer. | [rustc_errors], [rustc_lint], [annotate-snippets] | [#t-compiler/diagnostics][diagnostics_stream]
9-
LLVM | Working with LLVM upstream to represent Rust in its development | [rustc], [LLVM][llvm_code] | [#t-compiler/llvm][llvm_stream]
10-
MIR Optimizations | Write MIR optimizations and refactor the MIR to be more optimizable. | [MIR transform](mir_transform_code) | [#t-compiler/mir-opts][mir-opts-stream]
11-
Parallel-rustc | Making parallel compilation the default for rustc | [rustc] | [#t-compiler/parallel-rustc][parallel-rustc_stream]
5+
Name | Short Description | Code | Zulip Stream
6+
---- | ----------------- |-----------------------------------------------------------------------------| ------------
7+
Async-await Implementation | Implementing async-await | [Link][async-await_code] | [#wg-async][async-await_stream]
8+
Diagnostics | Use crates.io crates for diagnostics rendering and make emitting diagnostics nicer. | [rustc_errors], [rustc_lint], [annotate-snippets] | [#t-compiler/diagnostics][diagnostics_stream]
9+
LLVM | Working with LLVM upstream to represent Rust in its development | [rustc], [LLVM][llvm_code] | [#t-compiler/llvm][llvm_stream]
10+
MIR Optimizations | Write MIR optimizations and refactor the MIR to be more optimizable. | [MIR transform][mir_transform_code] | [#t-compiler/mir-opts][mir-opts-stream]
11+
Parallel-rustc | Making parallel compilation the default for rustc | [rustc] | [#t-compiler/parallel-rustc][parallel-rustc_stream]
1212
Polonius | Exploring the integration of the "NLL 2.0"-like ["Polonius analysis"][Polonius] into rustc | [borrow check][borrowck], [rust-lang/polonius][P], [rust-lang/datafrog][DF] | [#t-types/polonius][polonius_stream]
13-
RLS 2.0 | Experimenting with a new compiler architecture tailored for IDEs | [rust-analyzer][ra-repo] | [#t-compiler/rust-analyzer][rls20_stream]
14-
Rustc Dev Guide | Make the compiler easier to learn by ensuring that rustc-dev-guide is "complete" | [rustc], [rustc-dev-guide][rustc-dev-guide-repo] | [#t-compiler/rustc-dev-guide][rustc-dev-guide_stream]
13+
RLS 2.0 | Experimenting with a new compiler architecture tailored for IDEs | [rust-analyzer][ra-repo] | [#t-compiler/rust-analyzer][rls20_stream]
14+
Rustc Dev Guide | Make the compiler easier to learn by ensuring that rustc-dev-guide is "complete" | [rustc], [rustc-dev-guide][rustc-dev-guide-repo] | [#t-compiler/rustc-dev-guide][rustc-dev-guide_stream]
1515

1616
For historical record here's a list of Working Groups that are not active anymore (either because they reached their goals or because work stalled):
1717

src/infra/service-infrastructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Documentation on rfcbot commands can be found
4949
[rustbot](https://github.com/rust-lang/triagebot) is a bot ([bot user
5050
account](https://github.com/rustbot)) to assist with managing issues and PRs
5151
to allow users to label and assign without GitHub permissions. See
52-
[triagebot](../triagebot/index.html) for more information.
52+
[triagebot](../triagebot) for more information.
5353

5454
## DXR
5555

src/infra/toolstate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ To add a new tool to be tracked, the following steps must be taken:
108108
[subup]: https://github.com/ehuss/subup
109109
[toolstate]: https://rust-lang-nursery.github.io/rust-toolstate/
110110
[toolstate repository]: https://github.com/rust-lang-nursery/rust-toolstate/
111-
[forge]: ../index.html
111+
[forge]: ../README.md

src/libs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ It has details on current project groups, upcoming meetings, and the status of t
99

1010
The Libs team hangs out primarily in [the rust-lang Zulip](https://rust-lang.zulipchat.com/) these days in the `#t-libs` stream.
1111

12-
You can also find out more details about [Zulip and how the Rust community uses it](../../platforms/zulip.html).
12+
You can also find out more details about [Zulip and how the Rust community uses it](../platforms/zulip.md).

src/policies/crate-ownership.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ These should by and large not be considered to be "team managed" crates; this ca
8585

8686
## Transitions and new crates
8787

88-
Teams should feel free to create new crates in any of these categories; however "Intentional Artifact" crates must be accompanied with an RFC. As we move towards having team charters, this can transition to being a charter change (which may require an RFC or use its own process). Teams should notify <[email protected]> when they've created such crates so that the Leadership Council may track these crates and ensure this policy is applied.
88+
Teams should feel free to create new crates in any of these categories; however "Intentional Artifact" crates must be accompanied with an RFC. As we move towards having team charters, this can transition to being a charter change (which may require an RFC or use its own process). Teams should notify `[email protected]` when they've created such crates so that the Leadership Council may track these crates and ensure this policy is applied.
8989

9090
From time to time a team's plan for a crate may change: experiments may conclude, crates may need to be deprecated, or the team may decide to release something for wider usage.
9191

92-
In general, teams should notify <[email protected]> when such a transition is being made.
92+
In general, teams should notify `[email protected]` when such a transition is being made.
9393

9494
Any transition _away_ from "Intentional Artifact" requires an RFC.
9595

0 commit comments

Comments
 (0)