1# Development Process
2
3We use [issues] for asking questions ([open one here][newissue]!) and tracking
4bugs and unimplemented features, and [pull requests] (PRs) for tracking and
5reviewing code submissions.
6
7### Before submitting a PR
8
9Consider opening an issue to talk about it. PRs without corresponding issues
10are appropriate for fairly narrow technical matters, not for fixes to
11user-facing bugs or for feature implementations, especially when those features
12might have multiple implementation strategies that usefully could be discussed.
13
14Our issue templates might help you through the process.
15
16### When submitting PRs
17
18 - Please answer the questions in the pull request template. They are the
19   minimum information we need to know in order to understand your changes.
20
21 - Write clear commit messages that start with a one-line summary of the
22   change (and if it's difficult to summarize in one line, consider
23   splitting the change into multiple PRs), optionally followed by
24   additional context. Good things to mention include which areas of the
25   code are affected, which features are affected, and anything that
26   reviewers might want to pay special attention to.
27
28 - If there is code which needs explanation, prefer to put the explanation in a
29   comment in the code, or in documentation, rather than in the commit message.
30   Commit messages should explain why the new version is better than the old.
31
32 - Please include new test cases that cover your changes, if you can. If you're
33   not sure how to do that, we'll help you during our review process.
34
35 - For pull requests that fix existing issues, use [issue keywords]. Note that
36   not all pull requests need to have accompanying issues.
37
38 - When updating your pull request, please make sure to re-request review if
39   the request has been cancelled.
40
41### Focused commits or squashing
42
43We are not picky about how your git commits are structured. When we merge your
44PR, we will squash all of your commits into one, so it's okay if you add fixes
45in new commits.
46
47We appreciate it if you can organize your work into separate commits which each
48make one focused change, because then we can more easily understand your
49changes during review. But we don't require this.
50
51Once someone has reviewed your PR, it's easier for us if you _don't_ rebase it
52when making further changes. Instead, at that point we prefer that you make new
53commits on top of the already-reviewed work.
54
55That said rebasing (or merging from `main`) may still be required in situations
56such as:
57
58* Your PR has a merge conflict with the `main` branch.
59* CI on your PR is failing for unrelated reasons and a fix was applied to `main`
60  which needs to be picked up on your branch.
61* Other miscellaneous technical reasons may cause us to ask for a rebase.
62
63If you need help rebasing or merging, please ask!
64
65### Review and merge
66
67Anyone may submit a pull request, and anyone may comment on or review others'
68pull requests. However, one review from somebody in the [Core Team] is required
69before the Core Team merges it.
70
71Even Core Team members must create PRs and get review from another Core Team
72member for every change, including minor work items such as version bumps,
73removing warnings, etc.
74
75[issues]: https://guides.github.com/features/issues/
76[pull requests]: https://help.github.com/articles/about-pull-requests/
77[issue keywords]: https://help.github.com/articles/closing-issues-using-keywords/
78[Core Team]: https://github.com/orgs/bytecodealliance/people/
79[newissue]: https://github.com/bytecodealliance/wasmtime/issues/new
80