Skip to content

🍒[clang][Dependency Scanning] Move Module Timestamp Update After Compilation Finishes (#151774) #11146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

qiongsiwu
Copy link

When two threads are accessing the same pcm, it is possible that the reading thread sees the timestamp update, while the file on disk is not updated.

This PR moves timestamp update from writeAST to
compileModuleAndReadASTImpl, so we only update the timestamp after the file has been committed to disk.

rdar://152097193
(cherry picked from commit 09dbdf6)

…lation Finishes (llvm#151774)

When two threads are accessing the same `pcm`, it is possible that the
reading thread sees the timestamp update, while the file on disk is not
updated.

This PR moves timestamp update from `writeAST` to
`compileModuleAndReadASTImpl`, so we only update the timestamp after the
file has been committed to disk.

rdar://152097193
(cherry picked from commit 09dbdf6)
@qiongsiwu qiongsiwu requested a review from a team as a code owner August 7, 2025 17:32
@qiongsiwu
Copy link
Author

@swift-ci please test

@qiongsiwu qiongsiwu merged commit 0cb5017 into swiftlang:stable/20240723 Aug 8, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant