feat: enable gamma project by default#4036
Open
kkafar wants to merge 1 commit into
Open
Conversation
Flip RNS_GAMMA_ENABLED / rnsGammaEnabled from opt-in to opt-out so gamma sources are included unless explicitly disabled. - iOS: set RNS_GAMMA_ENABLED=0 to disable - Android: set rnsGammaEnabled=false to disable
Member
Author
|
cc @satya164 |
4 tasks
Member
Author
|
I'll wait a bit with landing this one. It might turn out problematic, because we assume no backward compatibility requirement for the new major, and in case we want to use any of the new React Native's APIs, such as optional values in codegen introduced in 0.84, we'll break the builds of the stable version. We need to either think of some new solution OR:
Currently I'm not sure middle ground is possible. |
4 tasks
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.
Description
Flip the gamma-project gate from opt-in to opt-out on both platforms.
Previously gamma sources were included only when the env var / Gradle
property was explicitly set to a truthy value; now they are included
by default and excluded only when the value is explicitly set to the
disable sentinel.
This makes gamma the default for downstream consumers and CI, while
still giving users a clean escape hatch if they need the pre-gamma
build.
The main motivation behind the change is to allow downstream solutions
exposing our experimental APIs w/o additional setup steps for the
end users.
I want to also note, that this should be safe to do, because the
synchronous event APIs are available since 0.82, which is the currently
oldest supported RN version.
Important
If any reviewer is aware of any React Native API we use in gamma code,
that is not available in 0.82, please point it out.
Changes
RNScreens.podspec):RNS_GAMMA_ENABLEDswitched from== '1'opt-in to!= '0'opt-out. SetRNS_GAMMA_ENABLED=0todisable.
android/build.gradle):rnsGammaEnabledswitched from== "true"opt-in to!= "false"opt-out. SetrnsGammaEnabled=false(e.g. ingradle.propertiesor-PrnsGammaEnabled=false) to disable.semantics.
Test plan
No new tests — this is a build-config default change. Manual verification:
pod installinFabricExample/iosshould log
[RNScreens] Gamma project enabled. Including source files.and include
ios/gamma/**sources.RNS_GAMMA_ENABLED=0 pod installshouldexclude
ios/gamma/**and instead pull inios/stubs/**.BuildConfig.RNS_GAMMA_ENABLEDresolves to
true../gradlew ... -PrnsGammaEnabled=falseresolves
BuildConfig.RNS_GAMMA_ENABLEDtofalse.Follow-ups (not in this PR):
FabricExample/android/app/build.gradle:91still uses the oldopt-in check and will need a matching flip if the example app
should track the library default.
RNS_GAMMA_ENABLED: 1(now redundant); nojob currently exercises the disabled path.
guides/CONTRIBUTING.md:128documents the old opt-in flow andneeds updating.
DEFINES_MODULE/React-RCTImagewill be removed in a separate PR.
Important
Before merging I need to verify build on 0.82
We need to also establish whether we'll want to use any APIs above 0.82 in near future. > If so, we can not turn this flag on.
Checklist