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(clean, cocoapods): clean spec cache + installed Pods #1620

Merged
merged 2 commits into from
Jun 3, 2022

Conversation

mikehardy
Copy link
Contributor

Summary:

I just saw that the CLI has a new clean command. That's fantastic!

Historically I steer people to https://github.com/pmadruga/react-native-clean-project but really it's basic functionality, glad to see it in the CLI.

I had a problem that I PRd to react-native-clean-project regarding cocoapods spec cache poisoning, and install / unpack failures, and they were solved by also cleaning ~/.cocoapods and cleaning ios/Pods so I am PR'ing that here

I understand paths might be an issue but since we are inside an os === darwin conditional, the ~/ should be okay. I'm not sure about the ios/ though and will happily take guidance

Test Plan:

In practice for a long time, here:

https://github.com/pmadruga/react-native-clean-project/blob/65c012ed0dcf4ea6786af867e8a7b1c1ee00be86/source/internals/tasks.js#L8-L22

  wipeiOSPodsFolder: {
    name: 'wipe iOS Pods folder',
    command: 'rm',
    args: ['-rf', 'ios/Pods']
  },
  wipeSystemiOSPodsCache: {
    name: 'wipe system iOS Pods cache',
    command: 'cd ios & pod',
    args: ['cache', 'clean', '--all']
  },
  wipeUseriOSPodsCache: {
    name: 'wipe user iOS Pods cache',
    command: 'rm',
    args: ['-rf', '~/.cocoapods']
  },

as documented in reactnative.dev, fixes java 8 build fail
Comment on lines +51 to +53
distribution: 'zulu'
java-version: 11
cache: 'gradle'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

config guide for quick cross-check if desired https://github.com/actions/setup-java#caching-gradle-dependencies

@@ -46,11 +46,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

v3 is current (well, v3.3.0 is, but they move the v3 tag along with releases) https://github.com/actions/setup-java/tags

Copy link
Member

@cortinico cortinico left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@thymikee thymikee merged commit d5ab214 into master Jun 3, 2022
@thymikee thymikee deleted the @mikehardy/clean-more-cocoapods branch June 3, 2022 17:41
@mikehardy
Copy link
Contributor Author

Nice! this looks much better, I hate seeing that red...

image

@thymikee
Copy link
Member

thymikee commented Jun 3, 2022

I guess I got used to it. Thank you for tackling this @mikehardy 🙇🏼‍♂️

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