Skip to content
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

Revert logic in cacheKey calculation introduced in #1163 #1200

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

art-divin
Copy link
Collaborator

@art-divin art-divin commented Sep 10, 2023

Context

The way cacheKey was calculated before #1163 was that includedFiles collection was empty, whereas after #1163, that collection always contains file paths.
Because of the aforementioned change in the logic of calculating cacheKey hash, the following issue occurs:

  1. buildDir path includes all files in .build folder, and thus, cacheKey depends on the build folder contents
  2. buildDir contains files like master.swiftdeps, .swiftsourceinfo, main.swift.o, DWARF/SwiftTemplate, build.db, context.bin, which change every time a build is performed (I suppose timestamp is used in these files in one way or another).
  3. Due to this change, hash of the key does not match and "previous" cache get deleted instead of being reused

Solution

Revert this change and advise to use --cacheDisabled flag because it would provide exactly the same behaviour as it is now in version 2.0.3.

Resolves #1196

@art-divin art-divin merged commit c584be5 into master Sep 11, 2023
2 checks passed
@art-divin art-divin deleted the fix-cacheKey-revertion branch September 11, 2023 04:45
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.

Version 2.0.3 has significant performance issues
1 participant