Skip to content

Commit 19f9c21

Browse files
committed
Merge upstream/master, resolve README conflict
2 parents 3c7cdd7 + 0fec9f3 commit 19f9c21

File tree

3,231 files changed

+65454
-31410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,231 files changed

+65454
-31410
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
FROM mcr.microsoft.com/devcontainers/base:jammy
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu
22

33
USER vscode
44
WORKDIR /home/vscode
55

66
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
7-
8-
ENV PATH="/home/vscode/.elan/bin:${PATH}"

.devcontainer/devcontainer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
22
"name": "Mathlib4 dev container",
33

4-
"image": "ghcr.io/leanprover-community/mathlib4/gitpod",
4+
"build": {
5+
"dockerfile": "Dockerfile"
6+
},
57

68
"onCreateCommand": "lake exe cache get!",
79

810
"hostRequirements": {
9-
"cpus": 4
11+
"cpus": 4,
12+
"memory": "8gb"
1013
},
1114

1215
"customizations": {
13-
"vscode" : {
14-
"extensions" : [ "leanprover.lean4" ]
16+
"vscode": {
17+
"extensions": ["leanprover.lean4"]
1518
}
1619
}
1720
}

.github/build.in.yml

Lines changed: 53 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878

7979
# Checkout the master branch into a subdirectory
8080
- name: Checkout master branch
81-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
81+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8282
with:
8383
# Recall that on the `leanprover-community/mathlib4-nightly-testing` repository,
8484
# we don't maintain a `master` branch at all.
@@ -88,7 +88,7 @@ jobs:
8888

8989
# Checkout the PR branch into a subdirectory
9090
- name: Checkout PR branch
91-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
91+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9292
with:
9393
ref: "${{ PR_BRANCH_REF }}"
9494
path: pr-branch
@@ -495,13 +495,58 @@ jobs:
495495
# run: |
496496
# cd pr-branch
497497
# env LEAN_ABORT_ON_PANIC=1 lake exe shake --gh-style
498-
499498
- name: lint mathlib
500499
if: ${{ always() && steps.build.outcome == 'success' || steps.build.outcome == 'failure' }}
501500
id: lint
501+
timeout-minutes: 40
502502
run: |
503503
cd pr-branch
504-
env LEAN_ABORT_ON_PANIC=1 lake exe runLinter --trace Mathlib
504+
set -o pipefail
505+
# Try running with --trace; if it fails due to argument parsing, the PR needs to merge master
506+
# We use .lake/ for the output file because landrun restricts /tmp access
507+
for attempt in 1 2; do
508+
if timeout 10m env LEAN_ABORT_ON_PANIC=1 stdbuf -oL lake exe runLinter --trace Mathlib 2>&1 | tee ".lake/lint_output_attempt_${attempt}.txt"; then
509+
break
510+
fi
511+
status=${PIPESTATUS[0]}
512+
if grep -q "cannot parse arguments" ".lake/lint_output_attempt_${attempt}.txt"; then
513+
echo ""
514+
echo "=============================================================================="
515+
echo "ERROR: Your branch uses an older version of runLinter that doesn't support"
516+
echo "the --trace flag. Please merge 'master' into your PR branch to get the"
517+
echo "updated linter, then push again."
518+
echo ""
519+
echo "You can do this with:"
520+
echo " git fetch upstream"
521+
echo " git merge upstream/master"
522+
echo " git push"
523+
echo "=============================================================================="
524+
echo ""
525+
exit 1
526+
fi
527+
if [ "$status" -eq 124 ]; then
528+
echo "runLinter timed out (attempt $attempt)."
529+
if [ "$attempt" -lt 2 ]; then
530+
echo "Retrying runLinter after timeout..."
531+
continue
532+
fi
533+
fi
534+
exit $status
535+
done
536+
537+
# We need to separate this step from the previous script because it needs to run outside of landrun
538+
- name: kill stray runLinter processes
539+
if: ${{ steps.lint.outcome == 'failure' }}
540+
continue-on-error: true
541+
shell: bash
542+
run: |
543+
echo "Checking for runLinter processes..."
544+
if pgrep -af runLinter; then
545+
echo "Killing runLinter processes..."
546+
pkill -f runLinter || true
547+
else
548+
echo "No stray runLinter processes found."
549+
fi
505550
506551
- name: end gh-problem-match-wrap for shake and lint steps
507552
uses: leanprover-community/gh-problem-matcher-wrap@20007cb926a46aa324653a387363b52f07709845 # 2025-04-23
@@ -552,12 +597,12 @@ jobs:
552597
runs-on: ubuntu-latest # Note these steps run on disposable GitHub runners, so no landrun sandboxing is needed.
553598
steps:
554599

555-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
600+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
556601
with:
557602
ref: "${{ PR_BRANCH_REF }}"
558603

559604
- name: Configure Lean
560-
uses: leanprover/lean-action@434f25c2f80ded67bba02502ad3a86f25db50709 # v1.3.0
605+
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
561606
with:
562607
auto-config: false # Don't run `lake build`, `lake test`, or `lake lint` automatically.
563608
use-github-cache: false
@@ -615,7 +660,7 @@ jobs:
615660
# make sure everything is available for test/import_all.lean
616661
# and that miscellaneous executables still work
617662
run: |
618-
lake build Batteries Qq Aesop ProofWidgets Plausible pole unused
663+
lake build Batteries Qq Aesop ProofWidgets Plausible
619664
620665
- name: build AesopTest (nightly-testing only)
621666
# Only run on the mathlib4-nightly-testing repository
@@ -624,34 +669,7 @@ jobs:
624669
lake build AesopTest
625670
626671
# We no longer run `lean4checker` in regular CI, as it is quite expensive for little benefit.
627-
# Instead we run it in a cron job on master: see `lean4checker.yml`.
628-
# Output is posted to the zulip topic
629-
# https://leanprover.zulipchat.com/#narrow/stream/345428-mathlib-reviewers/topic/lean4checker
630-
631-
- name: checkout lean4checker
632-
if: ${{ (always() && needs.build.outputs.build-outcome == 'success' || needs.build.outputs.build-outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
633-
shell: bash
634-
run: |
635-
git clone https://github.com/leanprover/lean4checker
636-
cd lean4checker
637-
# Read lean-toolchain file and checkout appropriate branch
638-
TOOLCHAIN=$(cat ../lean-toolchain)
639-
if [[ "$TOOLCHAIN" =~ ^leanprover/lean4:v ]]; then
640-
VERSION=${TOOLCHAIN#leanprover/lean4:}
641-
git checkout "$VERSION"
642-
else
643-
git checkout master
644-
fi
645-
646-
- name: run leanchecker on itself
647-
if: ${{ (always() && needs.build.outputs.build-outcome == 'success' || needs.build.outputs.build-outcome == 'failure') && contains(github.event.pull_request.changed_files, 'lean-toolchain') }}
648-
run: |
649-
cd lean4checker
650-
# Build lean4checker using the same toolchain
651-
cp ../lean-toolchain .
652-
lake build
653-
lake -q exe lean4checker Lean4Checker
654-
672+
# Instead we run it in a cron job on master: see `daily.yml`.
655673
style_lint:
656674
name: Lint styleJOB_NAME
657675
if: FORK_CONDITION

.github/workflows/PR_summary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
ref: ${{ github.event.pull_request.head.sha }}
2323
fetch-depth: 0
2424
path: pr-branch
2525

2626
# Checkout the master branch into a subdirectory
2727
- name: Checkout master branch
28-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2929
with:
3030
# When testing the scripts, comment out the "ref: master"
3131
ref: master
@@ -60,7 +60,7 @@ jobs:
6060
fi
6161
6262
- name: Set up Python
63-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
63+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
6464
with:
6565
python-version: 3.12
6666

.github/workflows/actionlint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
13+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1414

1515
- name: suggester / actionlint
16-
uses: reviewdog/action-actionlint@83e4ed25b168066ad8f62f5afbb29ebd8641d982 # v1.69.1
16+
uses: reviewdog/action-actionlint@e58ee9d111489c31395fbe4857b0be6e7635dbda # v1.70.0
1717
with:
1818
tool_name: actionlint
1919
fail_level: error
@@ -22,7 +22,7 @@ jobs:
2222
name: check workflows generated by build.in.yml
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626

2727
- name: update workflows
2828
run: |

.github/workflows/add_label_from_diff.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
if: github.repository == 'leanprover-community/mathlib4'
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626
with:
2727
ref: ${{ github.event.pull_request.head.sha }}
2828
fetch-depth: 0
2929
- name: Configure Lean
30-
uses: leanprover/lean-action@434f25c2f80ded67bba02502ad3a86f25db50709 # v1.3.0
30+
uses: leanprover/lean-action@c544e89643240c6b398f14a431bcdc6309e36b3e # v1.4.0
3131
with:
3232
auto-config: false
3333
use-github-cache: false
@@ -40,7 +40,7 @@ jobs:
4040
labels="$(lake exe autolabel)"
4141
printf '%s\n' "${labels}"
4242
# extract
43-
label="$(printf '%s' "${labels}" | sed -n 's=.*#\[\([^,]*\)\].*=\1=p')"
43+
label="$(printf '%s' "${labels}" | sed -n 's=^::notice::.*#\[\([^,]*\)\].*=\1=p')"
4444
printf 'label: "%s"\n' "${label}"
4545
if [ -n "${label}" ]
4646
then

.github/workflows/auto_assign_reviewers.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
name: assign automatically proposed reviewers
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
with:
1616
ref: master
1717
sparse-checkout: |
1818
scripts/assign_reviewers.py
1919
2020
- name: Set up Python
21-
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
21+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
2222
with:
2323
python-version: '3.x'
2424

0 commit comments

Comments
 (0)