Skip to content

Conversation

@mateoguzmana
Copy link
Collaborator

@mateoguzmana mateoguzmana commented May 6, 2025

Summary:

Static code analysis detected several missing ReplaceWith on deprecated methods. This diff addresses some of them by adding the most accurate suggestions based on the implementations.

Changelog:

[INTERNAL] - Add missing ReplaceWith on deprecations

Test Plan:

yarn android
yarn test-android

@facebook-github-bot facebook-github-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 May 6, 2025
@mateoguzmana mateoguzmana marked this pull request as ready for review May 6, 2025 21:57
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 6, 2025

internal class FabricEventEmitter(private val uiManager: FabricUIManager) : RCTModernEventEmitter {
@Deprecated("Deprecated in Java")
@Deprecated("Deprecated in Java", ReplaceWith("receiveEvent(ViewUtil.NO_SURFACE_ID, targetTag, eventName, params)"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right replacement. NO_SURFACE_ID will likely cause the event to be dropped.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out @javache. I've fixed the replacement to suggest passing the surfaceId instead in ea87ab7. Would that be a correct replacement?

@mateoguzmana mateoguzmana requested a review from javache May 7, 2025 15:04
@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 7, 2025
@facebook-github-bot
Copy link
Contributor

@javache merged this pull request in 84253c4.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @mateoguzmana in 84253c4

When will my fix make it into a release? | How to file a pick request?

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. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants