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

Fix Concurrent building occasionally cleans the Pods cache directory #11826 #11827

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

fabcz
Copy link

@fabcz fabcz commented Mar 22, 2023

For more details, please refer to #11826

fabcz pushed a commit to fabcz/cocoapods-fix-cache that referenced this pull request Apr 10, 2023
@dnkoutso dnkoutso added this to the 1.12.1 milestone Apr 13, 2023
* origin/master:
  Changelog spacing
  Update changelog
  Fix typo in validation
  Two spaces
  update tests
  Xcode 14.3 fix: pod lib lint warning generation from main.m.
  Update integrations spec
  Add an entry to changelog.
  Pass the -f option when resolving the path to the symlinked source.
@dnkoutso dnkoutso modified the milestones: 1.12.1, 1.13.0 Apr 18, 2023
@omarzl
Copy link

omarzl commented Jun 21, 2023

Thank you for the pr! 👏🏻
Just pinging you because I saw it has conflicts

@dnkoutso dnkoutso modified the milestones: 1.13.0, 1.14.0 Sep 22, 2023
@omarzl
Copy link

omarzl commented Oct 5, 2023

Hello @dnkoutso! can this one be merged? Thanks

@Westacular
Copy link
Contributor

Based on my reading of the code: if version == Pod::VERSION, then rewriting the version file is redundant and entirely unnecessary, because you'd just be writing the same contents over again.

In which case, this can be addressed without adding a lock using something like

         version_file = root + 'VERSION'
         version = version_file.read.strip if version_file.file?

         if version != Pod::VERSION
             root.rmtree if root.exist?
             root.mkpath
             version_file.open('w') { |f| f << Pod::VERSION }
         end

(or, for extra safety, add the lock as well while only conditionally performing the write like I'm suggesting)

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.

None yet

4 participants