Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure unstable-react-profiling build mode #47028

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ android {

buildConfigField("boolean", "IS_INTERNAL_BUILD", "false")
buildConfigField("int", "EXOPACKAGE_FLAGS", "0")
buildConfigField("boolean", "UNSTABLE_ENABLE_FUSEBOX_RELEASE", "false")

resValue("integer", "react_native_dev_server_port", reactNativeDevServerPort())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.facebook.react.common.SurfaceDelegate;
import com.facebook.react.common.SurfaceDelegateFactory;
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture;
import com.facebook.react.common.build.ReactBuildConfig;
import com.facebook.react.devsupport.DevSupportManagerFactory;
import com.facebook.react.devsupport.interfaces.DevLoadingViewManager;
import com.facebook.react.devsupport.interfaces.PausedInDebuggerOverlayManager;
Expand Down Expand Up @@ -92,7 +93,8 @@ protected ReactInstanceManagerBuilder getBaseReactInstanceManagerBuilder() {
ReactInstanceManager.builder()
.setApplication(mApplication)
.setJSMainModulePath(getJSMainModuleName())
.setUseDeveloperSupport(getUseDeveloperSupport())
.setUseDeveloperSupport(
getUseDeveloperSupport() || ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE)
.setDevSupportManagerFactory(getDevSupportManagerFactory())
.setDevLoadingViewManager(getDevLoadingViewManager())
.setRequireActivity(getShouldRequireActivity())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ public object ReactBuildConfig {
@JvmField public val IS_INTERNAL_BUILD: Boolean = BuildConfig.IS_INTERNAL_BUILD

@JvmField public val EXOPACKAGE_FLAGS: Int = BuildConfig.EXOPACKAGE_FLAGS

/** [Experimental] Enable React Native DevTools in release builds. */
@JvmField
public val UNSTABLE_ENABLE_FUSEBOX_RELEASE: Boolean = BuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public ReactHostImpl(
mUIExecutor = uiExecutor;
mMemoryPressureRouter = new MemoryPressureRouter(context);
mAllowPackagerServerAccess = allowPackagerServerAccess;
mUseDevSupport = useDevSupport;
mUseDevSupport = useDevSupport || ReactBuildConfig.UNSTABLE_ENABLE_FUSEBOX_RELEASE;
if (devSupportManagerFactory == null) {
devSupportManagerFactory = new DefaultDevSupportManagerFactory();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const InspectorFlags::Values& InspectorFlags::loadFlagsAndAssertUnchanged()
true,
#elif defined(HERMES_ENABLE_DEBUGGER)
ReactNativeFeatureFlags::fuseboxEnabledDebug(),
#elif defined(REACT_NATIVE_ENABLE_FUSEBOX_RELEASE)
true,
#else
ReactNativeFeatureFlags::fuseboxEnabledRelease(),
#endif
Expand Down
Loading