Skip to content

Commit b7c4fa0

Browse files
kim-emclaude
andauthored
chore: prefer lakefile.toml from nightly-testing in conflict resolution (#180)
Like lean-toolchain and lake-manifest.json, lakefile.toml is automatically modified each night in nightly-testing (unlike Mathlib). When merging from nightly-testing, we should prefer the nightly-testing version to avoid persistent merge conflicts. This change adds lakefile.toml to the automatic conflict resolution in two places: 1. When merging nightly-testing into bump/nightly-YYYY-MM-DD 2. When merging bump/nightly-YYYY-MM-DD into nightly-testing Fixes: https://leanprover.zulipchat.com/#narrow/channel/428973-nightly-testing/topic/Cslib.20bump.20branch.20reminders/near/558924262 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1640518 commit b7c4fa0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/create-adaptation-pr.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ git merge --no-edit $NIGHTLYSHA || true # ignore error if there are conflicts
147147
if git diff --name-only --diff-filter=U | grep -q .; then
148148
echo
149149
echo "### [auto] Conflict resolution"
150-
echo "### Automatically choosing 'lean-toolchain' and 'lake-manifest.json' from 'nightly-testing'"
151-
git checkout $NIGHTLYSHA -- lean-toolchain lake-manifest.json
152-
git add lean-toolchain lake-manifest.json
150+
echo "### Automatically choosing 'lean-toolchain', 'lake-manifest.json', and 'lakefile.toml' from 'nightly-testing'"
151+
git checkout $NIGHTLYSHA -- lean-toolchain lake-manifest.json lakefile.toml
152+
git add lean-toolchain lake-manifest.json lakefile.toml
153153
fi
154154

155155
if git diff --name-only --diff-filter=U | grep -q .; then
@@ -243,15 +243,15 @@ git merge --no-edit "bump/nightly-$NIGHTLYDATE" || true # ignore error if there
243243
if git diff --name-only --diff-filter=U | grep -q .; then
244244
echo
245245
echo "### [auto] Conflict resolution"
246-
echo "### Automatically choosing lean-toolchain and lake-manifest.json from the newer branch"
246+
echo "### Automatically choosing lean-toolchain, lake-manifest.json, and lakefile.toml from the newer branch"
247247
echo "### In this case, the newer branch is 'bump/nightly-$NIGHTLYDATE'"
248-
git checkout bump/nightly-$NIGHTLYDATE -- lean-toolchain lake-manifest.json
249-
git add lean-toolchain lake-manifest.json
248+
git checkout bump/nightly-$NIGHTLYDATE -- lean-toolchain lake-manifest.json lakefile.toml
249+
git add lean-toolchain lake-manifest.json lakefile.toml
250250

251251
# Check if there are more merge conflicts after auto-resolution
252252
if ! git diff --name-only --diff-filter=U | grep -q .; then
253253
# Auto-commit the resolved conflicts if no other conflicts remain
254-
git commit -m "Auto-resolved conflicts in lean-toolchain and lake-manifest.json"
254+
git commit -m "Auto-resolved conflicts in lean-toolchain, lake-manifest.json, and lakefile.toml"
255255
fi
256256
fi
257257

0 commit comments

Comments
 (0)