Skip to content

Swift: Fix self-compare in frontend-invocations test - #22329

Merged
navntoft merged 1 commit into
mainfrom
navntoft/fix-swift-frontend-invocations-integration-test
Aug 13, 2026
Merged

Swift: Fix self-compare in frontend-invocations test#22329
navntoft merged 1 commit into
mainfrom
navntoft/fix-swift-frontend-invocations-integration-test

Conversation

@navntoft

Copy link
Copy Markdown
Contributor

The changed line was a no-op in practice. The expected_files pytest fixture actually means "check this generated file against a committed expected file".

@github-actions github-actions Bot added the Swift label Aug 13, 2026

@redsun82 redsun82 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")

@redsun82 redsun82 Aug 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can now move this expected_files.add over the open above and avoid repeating hashes.actual

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes - will make a sweep to find other occurrences as well in a follow-up PR

@navntoft
navntoft marked this pull request as ready for review August 13, 2026 09:00
@navntoft
navntoft requested a review from a team as a code owner August 13, 2026 09:00
Copilot AI balanced review requested due to automatic review settings August 13, 2026 09:00
@navntoft
navntoft merged commit 4ded5b8 into main Aug 13, 2026
20 checks passed
@navntoft
navntoft deleted the navntoft/fix-swift-frontend-invocations-integration-test branch August 13, 2026 09:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the Swift frontend-invocations test so generated module hashes are compared correctly.

Changes:

  • Registers hashes.actual with the expected_files fixture, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants