Skip to content

Fix MissingSoLoaderLibrary lint warning in ReactNativeJNISoLoader.kt#55443

Open
mdvacca wants to merge 8 commits intofacebook:mainfrom
mdvacca:export-D91913117
Open

Fix MissingSoLoaderLibrary lint warning in ReactNativeJNISoLoader.kt#55443
mdvacca wants to merge 8 commits intofacebook:mainfrom
mdvacca:export-D91913117

Conversation

@mdvacca
Copy link
Contributor

@mdvacca mdvacca commented Feb 6, 2026

Summary:
Fixed MissingSoLoaderLibrary lint error in ReactNativeJNISoLoader.kt.

Added SoLoaderLibrary("reactnativejni") annotation to the class to declare the JNI dependency on the reactnativejni native library. This enables build tools to sanity check JNI merging.

Also added the required com.facebook.soloader.annotation:annotation dependency to the native-types target in BUCK.

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D91913117

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 6, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 6, 2026

@mdvacca has exported this pull request. If you are a Meta employee, you can view the originating Diff in D91913117.

Summary:
Fixed DoNotStripAnnotationUsage lint error in FabricUIManagerBinding.kt.

The class has many members (external methods like initHybrid, installFabricUIManager, etc.)
that need to be kept, so DoNotStripAny is more appropriate than DoNotStrip which only
keeps the directly annotated element.

changelog: [internal] internal

Differential Revision: D91840163
Summary:
Fixed ClownyBooleanExpression lint warning in FabricUIManager.java.

The expression `false && ReactBuildConfig.DEBUG` is intentionally used as a
development flag that can be easily toggled. The constant false ensures it's
disabled in production while making it clear how to enable it for development.

changelog: [internal] internal

Differential Revision: D91840560
Summary:
Fixed NotInvokedPrivateMethod lint warning for preallocateView in FabricUIManager.java.

This method is called from JNI/C++ code, not from Java, so the lint warning is
a false positive. Added SuppressLint annotation to suppress the warning.

changelog: [internal] internal

Differential Revision: D91840733
Summary:
Fixed JavadocsBackticksUse lint warning in FabricUIManager.java.

Replaced markdown-style backticks with proper javadoc {code ...} tags for
code references in the receiveEvent method documentation.

changelog: [internal] internal

Differential Revision: D91841151
…nteropUIBlockListener

Summary:
Fixed ClassNameDoesNotMatchFileName lint warning by renaming the file from
InteropUiBlockListener.kt to InteropUIBlockListener.kt to match the class name.

changelog: [internal] internal

Differential Revision: D91843967
Summary:
Fixed lint warnings in LongStreamingStats.kt:
- Replaced `size == 0` with `isEmpty()` for better readability
- Replaced `!!` operator with safe null handling using `?: 0L`

changelog: [internal] internal

Differential Revision: D91844147
Summary:
Fixed SelfComparison lint error by extracting the compared values into separate local variables, making it clearer to the linter that we're comparing two different instances.

The original code was comparing `this.reactApplicationContext` with `newRegister.reactApplicationContext`, but the linter incorrectly flagged it as a self-comparison due to the same property name.

changelog: [internal] internal

Differential Revision: D91797839
…acebook#55443)

Summary:
Pull Request resolved: facebook#55443

Fixed MissingSoLoaderLibrary lint error in ReactNativeJNISoLoader.kt.

Added `SoLoaderLibrary("reactnativejni")` annotation to the class to declare the JNI dependency on the reactnativejni native library. This enables build tools to sanity check JNI merging.

Also added the required `com.facebook.soloader.annotation:annotation` dependency to the native-types target in BUCK.

changelog: [internal] internal

Reviewed By: javache

Differential Revision: D91913117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants