Skip to content

Fix: Add binary compatibility forwarder for EventStream.recover#150

Closed
nguyenyou wants to merge 1 commit intoraquo:masterfrom
nguyenyou:fix/recover-bincompat-forwarders
Closed

Fix: Add binary compatibility forwarder for EventStream.recover#150
nguyenyou wants to merge 1 commit intoraquo:masterfrom
nguyenyou:fix/recover-bincompat-forwarders

Conversation

@nguyenyou
Copy link

@nguyenyou nguyenyou commented Feb 27, 2026

Summary

  • Add a single forwarding override for recover on EventStream
  • Restores the Scala.js IR method descriptor that libraries compiled against Airstream 17.x expect

Fixes #149

Context

As diagnosed by @sjrd in this comment, RecoverOps[+Self[+_], +A] has Self without the <: Observable[_] upper bound that BaseObservable has. When recover moved to RecoverOps in 18.0.0-M3, the Scala.js IR method descriptor changed (erased return type went from Observable to Object), breaking binary compatibility for downstream libraries compiled against 17.x.

The fix is minimal: only EventStream.recover needs a forwarder, since caliban (the affected library) only calls .map and .recover on EventStream, and .map is already overridden.

Reproduction

https://github.com/nguyenyou/airstream-recover-bincompat-repro

Test plan

  • All 309 Airstream tests pass
  • Verified with minimal repro: library compiled against Airstream 17.2.1 now links successfully with the patched Airstream 18.x

🤖 Generated with Claude Code

@nguyenyou nguyenyou requested a review from raquo as a code owner February 27, 2026 16:52
Only the recover method in EventStream is needed for caliban
compatibility, as it only uses .map and .recover on EventStream.
@nguyenyou nguyenyou force-pushed the fix/recover-bincompat-forwarders branch from c81cf3d to b73aa29 Compare February 28, 2026 05:33
@nguyenyou nguyenyou changed the title Fix: Add binary compatibility forwarders for recover* methods Fix: Add binary compatibility forwarder for EventStream.recover Feb 28, 2026
@raquo
Copy link
Owner

raquo commented Mar 12, 2026

Sorry, I don't think I'll be merging this after all. You've already worked around this locally, and nobody else has expressed interest in this. If I merge this, then yes, we'll get a bit of binary compatibility in v18 release, but then we'll have to break it again in the next release once we remove this forwarder (as I understand it). So it would just be delaying the breakage. Might as well be done with that now if it's not especially hurting anyone 🤷‍♂️

@raquo raquo closed this Mar 12, 2026
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.

Binary incompatibility: recover moved to RecoverOps breaks Scala.js linking for downstream libraries

2 participants