Skip to content

[6.1][Caching] Fix the cache replay bugs from driver C APIs #78282

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

cachemeifyoucan
Copy link
Contributor

@cachemeifyoucan cachemeifyoucan commented Dec 19, 2024

  • Explanation:This patch contains a serials of changes that targeted to fix the missing function in C APIs when replaying results from build system. It teaches the driver/build-system to replay the newly specialized makefile dependency files and symbol graph files correctly.
  • Scope: This fixes the wrong or missing outputs when there is a cache hit. The build system will fail to the replay make style dependency file and symbol graph output when that happens.
  • Issues:rdar://141567785
  • Original PRs:[Caching] Fix the cache replay bugs from driver C APIs #78279
  • Risk:Low. Swift Caching only.
  • Testing:Added UnitTests
  • Reviewers: @benlangmuir @rastogishubham

Fix uninitalized variables in IRGen options. Those options are
initialized with `|=` so it is important to initialize them to false.
Make sure the driver replay logics from C API can replay makefile
dependency file correctly.

rdar://141567785
Make output directory path cache invariant.
Add the logics to replay symbol graph output from driver APIs.
@cachemeifyoucan cachemeifyoucan requested a review from a team as a code owner December 19, 2024 00:28
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

If the output loading failed after cache key lookup, treat that as a
warning and resume as if that is a cache miss. This is not a valid
configuration for builtin CAS but can happen for a remote CAS service
that failed to serve the output. Instead of failing, we should continue
to compile to avoid disruptive failures.

rdar://140822432
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

This looks a safe fix to me.

@cachemeifyoucan cachemeifyoucan merged commit 02d91e8 into swiftlang:release/6.1 Dec 19, 2024
5 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.

2 participants