This PR https://github.com/scala/scala/pull/8824/files introduced certain changes to List class.
One of the results of this was disappearance of List.$anonfun$flatMap$1$adapted method which was marked both public and static.
This causes troubles when upgrading to 2.12.12 from 2.12.11, e.g. here we have problem with json4s 3.5.0:
java.lang.NoSuchMethodError: scala.collection.immutable.List.$anonfun$flatMap$1$adapted(Lscala/runtime/BooleanRef;Lscala/runtime/ObjectRef;Lscala/runtime/ObjectRef;Ljava/lang/Object;)Ljava/lang/Object;
java.lang.BootstrapMethodError: java.lang.NoSuchMethodError: scala.collection.immutable.List.$anonfun$flatMap$1$adapted(Lscala/runtime/BooleanRef;Lscala/runtime/ObjectRef;Lscala/runtime/ObjectRef;Ljava/lang/Object;)Ljava/lang/Object;
at org.json4s.MonadicJValue.findDirectByName(MonadicJValue.scala:25)
at org.json4s.MonadicJValue.$bslash(MonadicJValue.scala:18)
at com.box.artifactory.BoxArtifactoryClient.extractMd5(BoxAr
According to official docs 2.12.12 is binary compatible with 2.12.0 but clearly this is not the case.
I did not dig into it enought to check if json4s problems where caused by inline'ing or too aggressive optimization, but clearly stating that the new version is binary compatible is an overstatement here.
Can you please provide a fix that will make 2.12.12 and later versions fully compatible with 2.12.11?
Here is a diff between List versions of 2.12.12 and 2.12.11 (dumped via javap):
Reproduction steps
Scala version: 2.12.12 and later.
This PR https://github.com/scala/scala/pull/8824/files introduced certain changes to
List
class. One of the results of this was disappearance ofList.$anonfun$flatMap$1$adapted
method which was marked bothpublic
andstatic
.This causes troubles when upgrading to 2.12.12 from 2.12.11, e.g. here we have problem with json4s 3.5.0:
According to official docs 2.12.12 is binary compatible with 2.12.0 but clearly this is not the case.
I did not dig into it enought to check if json4s problems where caused by inline'ing or too aggressive optimization, but clearly stating that the new version is binary compatible is an overstatement here.
Can you please provide a fix that will make 2.12.12 and later versions fully compatible with 2.12.11?
Here is a diff between![image](https://github.com/scala/bug/assets/97525492/e00d1512-86a7-46e7-9765-1ade1a24a9ec)
List
versions of 2.12.12 and 2.12.11 (dumped viajavap
):