Swift: Fix self-compare in frontend-invocations test - #22329
Merged
navntoft merged 1 commit intoAug 13, 2026
Conversation
redsun82
approved these changes
Aug 13, 2026
redsun82
left a comment
Contributor
There was a problem hiding this comment.
the expected_files.add change now enabled a better shape for that code, but feel free to merge this as is to fix CI without waiting for another round
Comment on lines
16
to
+24
| with open("hashes.actual", "w") as actual: | ||
| hashes = [ | ||
| (s.name, s.resolve().name) | ||
| for s in Path("test-db/working/swift-extraction-artifacts/store").iterdir() | ||
| ] | ||
| hashes.sort() | ||
| for module, hash in hashes: | ||
| print(module, hash, file=actual) | ||
| expected_files.add("hashes.expected") | ||
| expected_files.add("hashes.actual") |
Contributor
There was a problem hiding this comment.
we can now move this expected_files.add over the open above and avoid repeating hashes.actual
Contributor
Author
There was a problem hiding this comment.
Oh yes - will make a sweep to find other occurrences as well in a follow-up PR
navntoft
marked this pull request as ready for review
August 13, 2026 09:00
navntoft
deleted the
navntoft/fix-swift-frontend-invocations-integration-test
branch
August 13, 2026 09:01
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the Swift frontend-invocations test so generated module hashes are compared correctly.
Changes:
- Registers
hashes.actualwith theexpected_filesfixture, avoiding a self-comparison.
Show a summary per file
| File | Description |
|---|---|
swift/ql/integration-tests/posix/frontend-invocations/test.py |
Corrects the hash comparison target. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
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.
The changed line was a no-op in practice. The
expected_filespytest fixture actually means "check this generated file against a committed expected file".