Skip to content

Commit

Permalink
Delete ReactInstancePackage (facebook#41095)
Browse files Browse the repository at this point in the history
Summary:

I'm deleting this class becase ReactInstancePackage has been deprecated since 2018 and I analyzed internal meta codebase and OSS codebase and it seems it's not being used.

changelog: [Android][Breaking] Delete ReactInstancePackage

Reviewed By: christophpurrer

Differential Revision: D50338299
  • Loading branch information
mdvacca authored and facebook-github-bot committed Oct 21, 2023
1 parent 33a3943 commit 069bba8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 45 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,8 @@ static Iterable<ModuleHolder> getNativeModuleIterator(
ReactConstants.TAG,
reactPackage.getClass().getSimpleName()
+ " is not a LazyReactPackage, falling back to old version.");
final List<NativeModule> nativeModules;
if (reactPackage instanceof ReactInstancePackage) {
ReactInstancePackage reactInstancePackage = (ReactInstancePackage) reactPackage;
nativeModules =
reactInstancePackage.createNativeModules(reactApplicationContext, reactInstanceManager);
} else {
nativeModules = reactPackage.createNativeModules(reactApplicationContext);
}
final List<NativeModule> nativeModules =
reactPackage.createNativeModules(reactApplicationContext);
return () ->
new Iterator<ModuleHolder>() {
int position = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ protected ReactPackageTurboModuleManagerDelegate(
continue;
}

if (shouldSupportLegacyPackages() && reactPackage instanceof ReactInstancePackage) {
// TODO(T145105887): Output error that ReactPackage was used
continue;
}

if (shouldSupportLegacyPackages()) {
// TODO(T145105887): Output warnings that ReactPackage was used
final List<NativeModule> nativeModules =
Expand Down

0 comments on commit 069bba8

Please sign in to comment.