Skip to content

fix(clean, cocoapods): clean spec cache + installed Pods - #1620

Merged
thymikee merged 2 commits into
masterfrom
@mikehardy/clean-more-cocoapods
Jun 3, 2022
Merged

thymikee merged 2 commits into
masterfrom
@mikehardy/clean-more-cocoapods

Conversation

@mikehardy

Copy link
Copy Markdown
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
Copy Markdown
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

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3

Copy link
Copy Markdown
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

@cortinico cortinico left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

image

@thymikee

thymikee commented Jun 3, 2022

Copy link
Copy Markdown
Member

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