Repository navigation
Fix #280: merge regen with --diff-algorithm=minimal, writing the proof only on a clean merge - #300
Merged
Merged
Conversation
git merge-file -p prints the merge instead of writing it into the proof, so regen no longer saves and restores the .dfy around the merge or before the old-Git retry. With fixed arguments, exit 129 can only mean the option was rejected, so the locale override and stderr match go. The tests use a sh fake git and cover the old-Git fallback, a non-conflict exit and a missing git; the existing conflict test covers real conflicts. The fixture's .gitattributes keeps its LF line endings.
On Git before 2.44 the test skips, so a CI image with old Git would turn the regression off without a failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces #296 so the change lands in one merge, as discussed there. It keeps the commit from #296 (
6b7278c) and adds two on top.Fixes #280.
018a054writes the merge only when it is clean.git merge-file -pprints the result instead of writing it into the.dfy, so regen no longer saves and restores the proof around the merge or before the old-Git retry. On a conflict, Git's output goes to.dfy.merged. The other arguments are fixed, so exit 129 alone means a Git before 2.44, and theLC_ALLoverride and the stderr regex are gone. I kept the error messages from #296 instead of thedafnyCheckDiffformat I suggested, because that format prints "git exited undefined" when git can't start and "git exited null" when it is killed.The tests use a
shfakegit, like the fakedafny, and cover the old-Git fallback, a non-conflict exit and a missinggit. The existing conflict test covers real conflicts. A.gitattributeskeeps the fixture's LF line endings. Against #296 this is 37 lines added and 136 removed.d69e4b4makes the large-proof test fail instead of skip whenCIis set, so a CI image with old Git can't turn the regression off. Drop it if you'd rather keep the skip.I ran
npm run typecheck,npm run typecheck:examplesandtools/test-fixtures.shin WSL with Git 2.43 and Dafny 4.11. They pass, with the large-proof test skipped. One test, "Dafny's string lastIndexOf computes JavaScript's result", fails in my environment onmainand on #296 as well, so I ran the script without that file. With Git 2.56 on Windows, the #280 fixture merges byte for byte throughdafnyRegen. I haven't run the large-proof test with Git 2.44 or later on Linux; CI covers it.