Skip to content

Commit bf0c6ec

Browse files
committed
Add a contribution process chapter
1 parent 3164a97 commit bf0c6ec

File tree

4 files changed

+106
-5
lines changed

4 files changed

+106
-5
lines changed

reference-dev-guide/src/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Summary
22

33
- [Introduction](introduction.md)
4-
- [Contribution process]()
4+
- [Contribution process](process/index.md)
5+
- [Stabilization process](process/stabilization.md)
56
- [Publishing process](publishing.md)
67
- [Reference tooling](tooling/index.md)
78
- [Building the Reference](tooling/building.md)

reference-dev-guide/src/introduction.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ Feel free to take information from the standard library and Rustonomicon as appr
3030

3131
Note that we don't write documentation for purely library features such as threads and IO and we don't write about Rust in the future. Documentation is written as if the current stable release of Rust is the last release. The `master` branch of the Reference corresponds to what is **stable** on the `master` branch ("nightly") of [rust-lang/rust]. If you want to write about Rust in the future, you want [the Unstable book][unstable].
3232

33-
## Stabilization
34-
35-
When something that alters the language is stabilized, an issue should be opened on the Reference [issue tracker] to track the documentation process. This should include links to any relevant information, such as the stabilization PR, the RFC, the tracking issue, and anything else that would be helpful for writing the documentation.
36-
3733
[Authoring Guide]: docs/authoring.md
3834
[introduction]: src/introduction.md
3935
[issue tracker]: https://github.com/rust-lang/reference/issues
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Contribution process
2+
3+
## Before contributing
4+
5+
We encourage people to discuss their changes before opening a PR. This gives the Reference team a chance to understand your idea better and ensure it fits with the intended direction of the Reference. Typically, you should file an issue or start a thread on [Zulip](#zulip) before submitting a pull request.
6+
7+
## Contributing process overview
8+
9+
The general outline of a contribution is as follows:
10+
11+
1. [Check out the source.](../tooling/building.md#checking-out-the-source)
12+
2. [Install mdbook.](../tooling/building.md#installing-mdbook)
13+
3. [Learn to build the book locally.](../tooling/building.md#running-mdbook)
14+
4. Make your changes to the source files. Be sure to follow all the guidelines in this book for styling, conventions, etc.
15+
5. [Run the tests.](../tests.md)
16+
6. [Submit a pull request](#submitting-a-pull-request)
17+
7. The PR will go through the review process.
18+
- There is a [guide](../review-policy.md) for the types of reviews it may undergo.
19+
- This may take a while, as the team has limited time.
20+
8. Once approved, a team member will merge the change.
21+
- The team may apply editorial changes before merging.
22+
- It may take a few weeks for the change to appear on the [nightly website](https://doc.rust-lang.org/nightly/reference/). See [the publishing chapter](../publishing.md) for more details.
23+
24+
## Office hours
25+
26+
The lang-docs team holds office hours on Tuesdays at [3:30 PM US/Eastern](https://dateful.com/convert/est-edt-eastern-time?t=330pm). We meet on [Jitsi Meet](https://meet.jit.si/rust-t-lang-docs). Check the [Zulip](#zulip) channel for the latest status and availability.
27+
28+
## Zulip
29+
30+
There are channels on Zulip for more direct discussions about the Reference:
31+
32+
- [`#t-lang-docs`](https://rust-lang.zulipchat.com/#narrow/channel/237824-t-lang-docs) --- Used by the lang docs team.
33+
- [`#t-lang-docs/reference`](https://rust-lang.zulipchat.com/#narrow/channel/520709-t-lang-docs.2Freference) --- Discussion about the Reference specifically.
34+
35+
## Working on issues
36+
37+
Issues labeled with [Help Wanted] are ones the team wants to see addressed and is asking for contributions.
38+
39+
If you want to work on an issue, you can assign yourself by commenting `@rustbot claim`. See [issue assignment] for more information.
40+
41+
[Help Wanted]: https://github.com/rust-lang/reference/issues?q=state%3Aopen%20label%3A%22Help%20Wanted%22
42+
[issue assignment]: https://forge.rust-lang.org/triagebot/issue-assignment.html
43+
44+
## New features
45+
46+
See the [stabilization chapter] for information on how to document new features.
47+
48+
[stabilization chapter]: stabilization.md
49+
50+
## Minor changes
51+
52+
Minor changes, like small corrections, wording cleanup, or formatting fixes, can be made simply by opening a PR.
53+
54+
## Major changes
55+
56+
Major changes, such as large rewrites, reorganization, or new chapters, should be approved by the Reference team first. Open an issue (if there isn't already one) to discuss the kinds of changes you are interested in. If the Reference team is able, they can work with you to approve the change.
57+
58+
## Submitting a pull request
59+
60+
When submitting a pull request, please follow these guidelines:
61+
62+
- Include a clear description of what the change is and why it is being made.
63+
- Try to keep a clean git history, with each commit explaining the reason for the change.
64+
- Use [GitHub’s keywords] in the description to automatically link to an issue if the PR resolves it. For example, `Closes #1234` will link issue #1234 to the PR. When the PR is merged, GitHub will automatically close the issue.
65+
66+
When your PR is submitted, GitHub automatically runs all tests. The GitHub interface shows a green checkmark if it passes, or a red X if it fails. Links to the logs are available on the PR page to diagnose any issues.
67+
68+
[GitHub’s keywords]: https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue
69+
70+
### PR labeling
71+
72+
PRs are marked with [labels] like [`S-waiting-on-review`] or [`S-waiting-on-author`] to indicate their status. Anyone can use the [`@rustbot`] bot to adjust the labels. If a PR is marked as `S-waiting-on-author` and you have pushed new changes that you would like reviewed, you can comment on the PR with `@rustbot ready`. The bot will switch the labels on the PR.
73+
74+
More information about these commands can be found at the [shortcuts documentation].
75+
76+
[`@rustbot`]: https://github.com/rustbot
77+
[`S-waiting-on-author`]: https://github.com/rust-lang/reference/labels/S-waiting-on-author
78+
[`S-waiting-on-review`]: https://github.com/rust-lang/reference/labels/S-waiting-on-review
79+
[labels]: https://github.com/rust-lang/reference/labels
80+
[shortcuts documentation]: https://forge.rust-lang.org/triagebot/shortcuts.html
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Stabilization process
2+
3+
New features and changes to the Rust language usually require an update to the Reference to incorporate the change. This can be done at any time before stabilization, and it is usually better to prepare a PR early (assuming the implementation is not expected to change significantly).
4+
5+
An exception to this process occurs when a language change involves a section of the Reference or language that is undocumented. For example, type inference is currently not documented, so changes to it do not require an update to the Reference.
6+
7+
## Pull request
8+
9+
When opening a PR, please include links to as much information as possible so that reviewers can better understand the change. This includes links to the following, if they exist:
10+
11+
- The tracking issue.
12+
- The `rust-lang/rust` stabilization pull request.
13+
- The stabilization report.
14+
- Background information such as RFCs.
15+
- The files in `rustc` where it is implemented, if it is isolated to a relatively concise part.
16+
- The tests in `rust-lang/rust`.
17+
18+
Some of this information may already exist, such as in the tracking issue, stabilization report, or PR, so there is no need to duplicate it.
19+
20+
## Inline tests
21+
22+
Because the Reference only documents stabilized features, inline tests will fail. We intend to improve this process in the future (see [#1864]).
23+
24+
[#1864]: https://github.com/rust-lang/reference/issues/1864

0 commit comments

Comments
 (0)