nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
22.26k stars 2.22k forks source link

@nx/react-native using cloud cache for pod install #23084

Open david-gettins opened 2 weeks ago

david-gettins commented 2 weeks ago

Current Behavior

The pod-install command now seems to use nx cloud cache. I last released my app when nx was at 18.1.2 after upgrading to 18.3.4 I noticed that the pod-install command pulled from the nx cloud cache. This caused my build to fail as the file, node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm, was missing. I also noticed a few other files from the same folder are not present.

I have upgraded React Native to 0.73.7 and the last successful build it was on 0.73.6. I can see the React Native team fixed an issue with these files around that version.

Expected Behavior

The pod-install command does not cache by default.

GitHub Repo

No response

Steps to Reproduce

  1. Run a pod-install in a CI environment at nx version 18.1.2 and React Native version 0.73.6.
  2. Upgrade to 18.3.4 and 0.73.7 respectively.
  3. Run another CI build.

Nx Report

Node   : 20.11.1
OS     : darwin-arm64
npm    : 10.2.4

nx                 : 18.3.4
@nx/js             : 18.3.4
@nx/jest           : 18.3.4
@nx/linter         : 18.3.4
@nx/eslint         : 18.3.4
@nx/workspace      : 18.3.4
@nx/detox          : 18.3.4
@nx/devkit         : 18.3.4
@nx/esbuild        : 18.3.4
@nx/eslint-plugin  : 18.3.4
@nx/node           : 18.3.4
@nx/react          : 18.3.4
@nx/react-native   : 18.3.4
@nrwl/tao          : 18.3.4
@nx/web            : 18.3.4
@nx/webpack        : 18.3.4
typescript         : 5.4.3
---------------------------------------
Registered Plugins:
@nx/react-native/plugin
@nx/eslint/plugin
@nx/webpack/plugin
@nx/detox/plugin
@nx/jest/plugin

Failure Logs

error: Build input file cannot be found: 'path/to/runner/_work/repo-name/repo-name/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'React-RCTFabric' from project 'Pods')

Package Manager Version

10.2.4

Operating System

Additional Information

nx run my-app:pod-install [remote cache]

david-gettins commented 2 weeks ago
Screenshot 2024-04-29 at 21 43 54

My base and head SHAs are not between this release tag and the last released tag. So I suppose I can fix this issue by sorting that out, but I'm not sure how to set those for a non-affected command. To get this release out I have set the pod-install target to not be cache-able until I get time to sort out the CI SHAs.

In nx.json:

"targetDefaults": {
  "pod-install": {
    "cache": false
  }
}