Skip to content

[Discord] Drop the renderer architecture from the constants cache key - #50

Merged
joemun merged 1 commit into
0.86.0-discordfrom
joemun/constants-cache-no-flag-read
Sep 11, 2026
Merged

joemun merged 1 commit into
0.86.0-discordfrom
joemun/constants-cache-no-flag-read

Conversation

@joemun

@joemun joemun commented Sep 11, 2026 •

Copy link
Copy Markdown

The cache keyed on app version plus renderer architecture, reading the architecture from ReactNativeFeatureFlags. RN only accepts override() before any flag is read, and init() runs from whichever of Application or ReactActivity.onCreate gets there first, so an Activity created before the app applies its override wins the race and the override is refused. The app applies it in a FutureTask, so every consumer rethrows it for the rest of the process.

Unnecessary since we're on Fabric now.

The key combined the app version with the renderer architecture, the latter
read from ReactNativeFeatureFlags. init() runs from whichever of Application
or ReactActivity.onCreate reaches it first, so an Activity created before the
host app has applied its own ReactNativeFeatureFlags override performs that
read first, and React Native then refuses the override for the life of the
process.

The app is Fabric-only, so the architecture cannot vary within an app
version, and the app version is already part of the key.
@joemun
joemun marked this pull request as ready for review September 11, 2026 19:55
@joemun
joemun requested a review from Flewp September 11, 2026 19:56
@joemun
joemun merged commit 33eae92 into 0.86.0-discord Sep 11, 2026
38 checks passed
@joemun
joemun deleted the joemun/constants-cache-no-flag-read branch September 11, 2026 20:41
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.

2 participants