Skip to content

Commit

Permalink
Deprecate CatalystInstance in old architecture (#47383)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #47383

CatalystInstance is deprecated and will be removed in new architecture

changelog: [Android][Changed] Deprecate CatalystInstance in old architecture

Reviewed By: cortinico

Differential Revision: D65430643

fbshipit-source-id: 96ba91c45760ead8155f9f28b6fad523be75929e
  • Loading branch information
mdvacca authored and facebook-github-bot committed Nov 9, 2024
1 parent 7794d7a commit 3e27ef1
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ package com.facebook.react.bridge

import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.bridge.queue.ReactQueueConfiguration
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture
import com.facebook.react.common.annotations.VisibleForTesting
import com.facebook.react.internal.turbomodule.core.interfaces.TurboModuleRegistry
import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder
Expand All @@ -20,6 +19,9 @@ import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHol
* the invocation of JavaScript methods and lets a set of Java APIs be invocable from JavaScript as
* well.
*/
@Deprecated(
message =
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
@DoNotStrip
public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundleLoaderDelegate {
public fun runJSBundle()
Expand Down Expand Up @@ -117,21 +119,18 @@ public interface CatalystInstance : MemoryPressureListener, JSInstance, JSBundle
*/
public val nativeMethodCallInvokerHolder: NativeMethodCallInvokerHolder

@DeprecatedInNewArchitecture(
@Deprecated(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not" +
" encouraged usage.")
"This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
public fun setTurboModuleRegistry(turboModuleRegistry: TurboModuleRegistry)

@DeprecatedInNewArchitecture(
@Deprecated(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not" +
" encouraged usage.")
"This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
public fun setFabricUIManager(fabricUIManager: UIManager)

@DeprecatedInNewArchitecture(
@Deprecated(
message =
"This method will be deprecated later as part of Stable APIs with bridge removal and not" +
" encouraged usage.")
"This method is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
public fun getFabricUIManager(): UIManager?
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.runtime

import android.content.res.AssetManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.bridge

import com.facebook.react.bridge.queue.MessageQueueThreadSpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.modules.network

import com.facebook.react.bridge.Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.modules.timing

import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.uimanager

import android.view.View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.views.image

import android.graphics.Color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
* LICENSE file in the root directory of this source tree.
*/

// TODO T207169925: Migrate CatalystInstance to Reacthost and remove the Suppress("DEPRECATION")
// annotation
@file:Suppress("DEPRECATION")

package com.facebook.react.views.textinput

import android.graphics.Color
Expand Down

0 comments on commit 3e27ef1

Please sign in to comment.