scala-js/scala-js-dom

is changing `Array` -> `FrozenArray` binary compatible?

yurique opened this issue · 4 comments

After updating 2.3.0 -> 2.6.0 (as part of Laminar update) I got a compilation error in this piece of code:

Option(ev.dataTransfer).exists(_.types.contains(format))

types became a FrozenArray and no longer has the .contains method.

So this is obviously not source-compatible (which is okay and expected), but is it binary compatible?

PR:
#763

Relevant change:
976316c#diff-bee8c85a4317c93e362f64be85e566c7583875855b80a078cc8dddc277700a72R78

Yes, see:

Specifically:

Most changes in the DOM facades belong to one of those, since it is often fixing types and adding members in classes/traits. They would be flagged as false positives.

Right, this does make sense in the context of js+dom :)

Thanks!

Are there extension methods for the frozen array somewhere? (To get the .contains back, for example)

Are there extension methods for the frozen array somewhere? (To get the .contains back, for example)

I guess not, sorry about that 😕 we should add them, or find some other solution.

No worries! (there are always workarounds to be found :) )