Skip to content

Commit 2423593

Browse files
fgdoraisjcommelin
andauthored
doc: Mathlib adaptation process (#1166)
Co-authored-by: Johan Commelin <johan@commelin.net>
1 parent 71c6442 commit 2423593

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,30 @@ One of the easiest ways to contribute is to find a missing proof and complete it
6464
declaration documents statements that have been identified as being useful, but that have not yet
6565
been proven.
6666

67-
In contrast to mathlib, `batteries` uses pull requests from forks of this repository. Hence, no special permissions on this repository are required for new contributors.
67+
In contrast to Mathlib, Batteries uses pull requests from forks of this repository. Hence, no special permissions on this repository are required for new contributors.
6868

6969
You can change the labels on PRs by commenting one of `awaiting-review`, `awaiting-author`, or `WIP`. This is helpful for triage.
70+
71+
### Mathlib Adaptations
72+
73+
Batteries PRs often affect Mathlib, a key component of the Lean ecosystem.
74+
When Batteries changes in a significant way, Mathlib must adapt promptly.
75+
When necessary, Batteries contributors are expected to either create an adaptation PR on Mathlib, or ask for assistance for and to collaborate with this necessary process.
76+
77+
Every Batteries PR has an automatically created Mathlib branch called `batteries-pr-testing-N` where `N` is the number of the Batteries PR.
78+
This is a clone of Mathlib where the Batteries requirement points to the Batteries PR branch instead of the main branch.
79+
Batteries uses this branch to check whether the Batteries PR needs Mathlib adaptations.
80+
A tag `builds-mathlib` will be issued when this branch needs no adaptation; a tag `breaks-mathlib` will be issued when the branch does need an adaptation.
81+
82+
The first step in creating an adaptation PR is to switch to the `batteries-pr-testing-N` branch and push changes to that branch until the Mathlib CI process works.
83+
Changes to the Batteries PR will be integrated automatically as you work on this process.
84+
Do not redirect the Batteries requirement to main until the Batteries PR is merged.
85+
Please ask questions to Batteries and Mathlib maintainers if you run into issues with this process.
86+
87+
When everything works, create an adaptation PR on Mathlib from the `batteries-pr-testing-N` branch.
88+
You may need to ping a Mathlib maintainer to review the PR, ask if you don't know who to ping.
89+
Once the Mathlib adaptation PR and the original Batteries PR have been reviewed and accepted, the Batteries PR will be merged first. Then, the Mathlib PR's lakefile needs to be repointed to the Batteries main branch: change the Batteries line to
90+
```lean
91+
require "leanprover-community" / "batteries" @ git "main"
92+
```
93+
Once CI once again checks out on Mathlib, the adaptation PR can be merged using the regular Mathlib process.

0 commit comments

Comments
 (0)