]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | This document outlines processes regarding management of rustfmt. |
2 | ||
3 | # Stabilising an Option | |
4 | ||
5 | In this Section, we describe how to stabilise an option of the rustfmt's configration. | |
6 | ||
7 | ## Conditions | |
8 | ||
9 | - Is the default value correct ? | |
10 | - The design and implementation of the option are sound and clean. | |
11 | - The option is well tested, both in unit tests and, optimally, in real usage. | |
12 | - There is no open bug about the option that prevents its use. | |
13 | ||
14 | ## Steps | |
15 | ||
16 | Open a pull request that closes the tracking issue. The tracking issue is listed beside the option in `Configurations.md`. | |
17 | ||
18 | - Update the `Config` enum marking the option as stable. | |
19 | - Update the the `Configuration.md` file marking the option as stable. | |
20 | - Update `CHANGELOG.md` marking the option as stable. | |
21 | ||
22 | ## After the stabilisation | |
23 | ||
24 | The option should remain backward-compatible with previous parameters of the option. For instance, if the option is an enum `enum Foo { Alice, Bob }` and the variant `Foo::Bob` is removed/renamed, existing use of the `Foo::Bob` variant should map to the new logic. Breaking changes can be applied under the condition they are version-gated. | |
25 | ||
26 | # Make a Release | |
27 | ||
28 | ## 0. Update CHANGELOG.md | |
29 | ||
30 | ## 1. Update Cargo.toml and Cargo.lock | |
31 | ||
32 | For example, 1.0.0 -> 1.0.1: | |
33 | ||
34 | ```diff | |
35 | -version = "1.0.0" | |
36 | +version = "1.0.1" | |
37 | ``` | |
38 | ||
39 | ## 2. Push the commit to the master branch | |
40 | ||
41 | E.g., https://github.com/rust-lang/rustfmt/commit/5274b49caa1a7db6ac10c76bf1a3d5710ccef569 | |
42 | ||
43 | ## 3. Create a release tag | |
44 | ||
45 | ```sh | |
46 | git tag -s v1.2.3 -m "Release 1.2.3" | |
47 | ``` | |
48 | ||
49 | ## 4. Publish to crates.io | |
50 | ||
51 | `cargo publish` | |
52 | ||
53 | ## 5. Create a PR to rust-lang/rust to update the rustfmt submodule |