Skip to content

fix: restore main build — missing CancellationException import in SearchViewModel - #319

Merged
ajisth69 merged 2 commits into
mainfrom
fix/main-ci-cancellation-import
Oct 14, 2026
Merged

ajisth69 merged 2 commits into
mainfrom
fix/main-ci-cancellation-import

Conversation

@ajisth69

@ajisth69 ajisth69 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Restores main's build after #318/#317 merged. Two compile breaks, one import and one visibility fix:

  1. \SearchViewModel.kt\ used \CancellationException\ in
    unSearch's stale-response guard without importing it — :app:compileDebugKotlin\ failed on main (\e: SearchViewModel.kt:208:22 Unresolved reference 'CancellationException').
  2. \YtMusicLikeTest\ called \likeTargetBody\ as a static on the Hilt-injected \InnerTubeMusicApi, but it was an instance member — :app:compileDebugUnitTestKotlin\ failed. It is now a file-level internal fun beside the endpoints, which the test already resolves. No behaviour change.

CI green on \d6f1baa.

The guard rethrows CancellationException from the catch block, which never had the import, so :app:compileDebugKotlin failed on main after #318 merged. One import, no behaviour change.
likeTargetBody was an instance member on the Hilt-injected class, so the unit test could not call it (Unresolved reference in :app:compileDebugUnitTestKotlin). It is now a file-level internal fun next to the endpoints, which the test already reaches.
@ajisth69
ajisth69 merged commit 15bafdb into main Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant