Add pnpm-lock.yaml to default lock files in autolinkLibrariesFromCommand - #58128
Add pnpm-lock.yaml to default lock files in autolinkLibrariesFromCommand#58128JoelTowell wants to merge 1 commit into
Conversation
|
Hi @JoelTowell! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Summary:
Android autolinking caches the output of
npx @react-native-community/cli configso Gradle does not rerun it on every build. The cache is considered stale when certain files change, currently onlyyarn.lock,package-lock.json,package.json, andreact-native.config.jsby default.Notably,
pnpm-lock.yamlis absent from that list, so apnpm installthat only touched the pnpm lockfile would keep using the old cache. Native libraries could be missing or stale until something else forced a refresh.This PR adds
pnpm-lock.yamlto the default list inautolinkLibrariesFromCommand:If a project already passes its own
lockFiles, that override still wins, this only changes the default.It appears that SwiftPM iOS is already checking
pnpm-lock.yamlto determine staleness here, so this change just brings Android in line with that.Changelog:
[ANDROID] [FIXED] - Invalidate the Android autolinking cache when
pnpm-lock.yamlchangesTest Plan:
I didn't run
./gradlew testas suggested here becausesettings.gradle.ktsin repo root overrideslockFiles, so RNTester would not hit the new default anyway.Ran the gradle-plugin unit tests:
Output: