Two of those four sorts were still the old ones - #4
Merged
Merged
Conversation
The previous change replaced sort_strs and sort_deps with calls to the builtin and left the old bodies in the same file. twill takes the last definition of a name, so both files defined the function twice and both kept using the insertion sort. Everything passed: the tests, the source gate, CI. Nothing there looks at whether a name is defined twice. So that commit's claim was wrong for half of what it claimed. lockfile and resolve were converted properly; strutil and manifest were not, until now. Forty lines of dead code go with them, and one orphaned comment line that belonged to the body that is gone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
#3 said four insertion sorts became four calls. Two of them did.
sort_strsandsort_depsgot their one-line replacements added above the old bodies, which stayed. twill takes the last definition of a name, so both files defined the function twice and both kept running the insertion sort.Everything passed — the tests, the source gate, CI — because nothing in any of them looks at whether a name is defined twice.
lockfile.sort_entriesandresolve.sort_versionswere converted properly.This deletes the 42 lines that were still doing the work, and one orphaned comment line left behind by the body it described.
Verified the way it should have been the first time:
grep -c '^fn sort_strs'is 1,grep -c '^fn sort_deps'is 1, six suites pass.The language observation is worth recording separately: a redefinition is silent, and the second one wins.
fn f() = "first"followed byfn f() = "second"printssecondwith no diagnostic from either checker.🤖 Generated with Claude Code