Skip to content

[Frontend]: Write out .swiftdeps files atomically (SR-8707) #19752

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
merged 1 commit into from
Oct 9, 2018

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Oct 6, 2018

Modify ReferenceDependenciesEmitter::emit to write to a temporary file and then atomically rename it in place using the atomicallyWritingToFile helper function.
This resolves SR-8707, where .swiftdeps files could be truncated if the compiler job was killed in the middle of a write.

Resolves SR-8707.

Modify ReferenceDependenciesEmitter::emit to write to a temporary file and then atomically rename it in place using the atomicallyWritingToFile helper function.
This resolves SR-8707, where .swiftdeps files could be truncated if the compiler job was killed in the middle of a write.
Copy link
Contributor

@graydon graydon left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@graydon
Copy link
Contributor

graydon commented Oct 9, 2018

@swift-ci please test and merge

@swift-ci swift-ci merged commit 3acdff6 into swiftlang:master Oct 9, 2018
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.

3 participants