Repository navigation
Conversation
Autolinking reports only package names and paths, and node_modules is not hashed, so upgrading a native dependency left the fingerprint unchanged on Android and the remote cache served a build compiled from the previous version. iOS was covered only because ios/Podfile.lock is part of the hashed sources. Read each autolinked dependency's package.json and add its version to the autolinkingSources input. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
@serzmerz is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nativeFingerprinthashes the autolinking config, but that config carries only package names and paths. Native sources live undernode_modules, which the fingerprint does not hash. Upgrading a native dependency therefore leaves the fingerprint unchanged, and the remote cache serves a build compiled from the previous version.On iOS this is masked because
ios/Podfile.lockchanges with the dependency and is part of the hashedios/folder. Android has no equivalent lockfile underandroid/, so the stale cache hit goes unnoticed.This PR adds the installed
versionof each autolinked dependency (read from itspackage.json) to theautolinkingSourcesinput. A native dependency bump now changes the fingerprint on every platform. JS-only dependencies are not autolinked, so they still do not affect it.How we hit it
In a React Native app using Rock 0.12.x we upgraded
react-native-view-shot4.0.3 → 6.1.1.rock fingerprint -p androidwas identical tomain, the CI job reported success after a cache hit, and the downloaded APK still contained the 4.0.3 native code. Over 60 days, seven native dependency bumps merged without touchingandroid/, each reusing a stale Android artifact.The only config-level workaround is adding
yarn.locktofingerprint.extraSources, which also invalidates the cache for JS-only dependency changes. Paths undernode_modulescannot be used inextraSourcesbecause gitignored paths are excluded by the hasher.Changes
parseAutolinkingSourcesreads<dependency root>/package.jsonand storesversionnext torootandplatforms. A missing or unreadablepackage.jsonleavesversionundefined, so such a dependency keeps its current behaviour.autolinkingSourcesinput contains relative paths plus the version.@rock-js/tools.Test plan
pnpm vitest run packages/tools(13 passed)pnpm --filter @rock-js/tools build(typecheck)prettier --checkandeslinton the changed files🤖 Generated with Claude Code