Keep input order of files within striped jobs#5859
Merged
ondrejmirtes merged 1 commit intoJun 12, 2026
Conversation
The size sort from phpstan#5844 also changed the order files are analysed in within a job, and analysis results can be sensitive to that: in the bug-14036 e2e the 560-byte middleware file moved before the 327-byte bootstrap file, so MemoizingReflector (lowercased keys) resolved SQLitePlatform first and a later SqlitePlatform lookup reported class.nameCase instead of the expected class.notFound. The sort now only decides which job a file lands in; within each job the original input order is restored. make phpstan stays at 1.07x (17.73 +- 0.04 s vs 19.00 +- 0.06 s base). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Member
|
Thank you! |
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.
Fixes the bug-14036 e2e regression from #5844, reported by @staabm.
The size sort also changed the order files get analysed in within a job, and results can be sensitive to that: the 560-byte middleware file moved before the 327-byte bootstrap file, so
MemoizingReflector(lowercased keys) resolvedSQLitePlatformfirst and the laterSqlitePlatformlookup reportedclass.nameCaseinstead of the expectedclass.notFound. (I missed this locally because APFS is case-insensitive, which makes the e2e fail on base too on macOS.)The sort now only decides which job a file lands in; within each job the original input order is restored.
testFilesWithinAJobKeepTheirInputOrderpins the bug-14036 shape.make phpstanstays at 1.07× (17.73 ± 0.04 s vs 19.00 ± 0.06 s base).🤖 Generated with Claude Code