Skip to content

[Index] Write empty record files #73911

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
May 29, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 25, 2024

When indexing an empty Swift file, we get a unit file that doesn’t have any record dependency declared on the source file. Because of this, we always assume that the empty file has an out of date index store entry and re-index it on project open. Write empty record files to fix this.

rdar://128711594

@ahoppen
Copy link
Member Author

ahoppen commented May 25, 2024

@swift-ci Please smoke test

@ahoppen ahoppen force-pushed the write-empty-record-files branch from 6a3df0a to 88adda9 Compare May 25, 2024 15:21
When indexing an empty Swift file, we get a unit file that doesn’t have any record dependency declared on the source file. Because of this, we always assume that the empty file has an out of date index store entry and re-index it on project open. Write empty record files to fix this.

rdar://128711594
@ahoppen ahoppen force-pushed the write-empty-record-files branch from 88adda9 to 0614fc9 Compare May 25, 2024 15:21
@ahoppen
Copy link
Member Author

ahoppen commented May 25, 2024

@swift-ci Please smoke test

@ahoppen ahoppen merged commit 0ad6a87 into swiftlang:main May 29, 2024
3 checks passed
@ahoppen ahoppen deleted the write-empty-record-files branch May 29, 2024 16:43
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