Skip to content

Fix MountItemDispatcherTest compilation after pullTransaction was added - #59393

Closed
cipolleschi wants to merge 1 commit into
react:mainfrom
cipolleschi:cipolleschi/fix-android-mountitemdispatcher-test
Closed

cipolleschi wants to merge 1 commit into
react:mainfrom
cipolleschi:cipolleschi/fix-android-mountitemdispatcher-test

Conversation

@cipolleschi

Copy link
Copy Markdown
Contributor

Summary:

build_android is red on main because the ReactAndroid unit tests no longer compile:

e: MountItemDispatcherTest.kt:167:11 Class 'MountItemDispatcherTest.RecordingItemDispatchListener' is not abstract and does not implement abstract member:
fun pullTransaction(surfaceId: Int): Unit
Execution failed for task ':packages:react-native:ReactAndroid:compileDebugUnitTestKotlin'.

Two changes that were each green on their own collided:

This PR implements pullTransaction as a no-op in the test listener. The listener already does the same for the other callbacks the tests don't record (willMountItems, didMountItems, onItemsQueued). Production code doesn't change.

Changelog:

[INTERNAL] [FIXED] - Fix MountItemDispatcherTest compilation

Test Plan:

  • The failure reproduces on main, for example in run https://github.com/react/react-native/actions/runs/39902319109 (build_android). It has been failing since the main run for 0876643.
  • FabricUIManager is the only other ItemDispatchListener implementation, and it already overrides pullTransaction, so the test listener is the only implementation missing it.
  • I couldn't run Gradle locally because npm registry access is blocked on my machine, so yarn install fails. The build_android job on this PR runs exactly the failing compileDebugUnitTestKotlin task and verifies the fix.

react#57164 added `RecordingItemDispatchListener` to `MountItemDispatcherTest`,
but react#59029 had added an abstract `pullTransaction(surfaceId: Int)` to
`MountItemDispatcher.ItemDispatchListener` in the meantime. Each change was
green on its own; combined, `compileDebugUnitTestKotlin` fails on main and
breaks `build_android`.

Implement `pullTransaction` as a no-op in the test listener, matching the
other callbacks it doesn't need to record.
@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 Oct 23, 2026
@meta-codesync

meta-codesync Bot commented Oct 23, 2026

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D127134507.

@github-actions

Copy link
Copy Markdown

Visual regression

No visual differences at ed93718cf2d3.

ios: no capture

@meta-codesync meta-codesync Bot closed this in 097bcce Oct 23, 2026
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @cipolleschi in 097bcce

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

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 23, 2026
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. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants