Is 2.8.2 really binary compatible with 2.8.1?

33 views
Skip to first unread message

Jean-Philippe Pellet

unread,
Sep 15, 2011, 8:45:14 AM9/15/11
to Scala IDE User
Hi,

I'm using the new beta10, and have compiled a rather large project
against the bundled Scala library, version 2.8.2.r25648-something.
After compiling, if I run it with version 2.8.1 on the class path, I
get this exception when I call start() on an actor:

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError:
scala.actors.ReactorCanReply$class.$init$(Lscala/actors/
ReactorCanReply;)V

So, it looks to me like 2.8.2 is not binary compatible with 2.8.1, or
have I done something wrong?

Cheers,
J.-P.

Mirco Dotta

unread,
Sep 15, 2011, 9:23:30 AM9/15/11
to scala-i...@googlegroups.com
Hi Jean-Philippe,

against the bundled Scala library, version 2.8.2.r25648-something.
After compiling, if I run it with version 2.8.1 on the class path, I
get this exception when I call start() on an actor:

I can't find the problem. Here is what I did:

I took the org.scala-ide.scala.library_2.8.2.r25648-b20110913024304.jar bundled
with the beta10 release, unpackaged and ran `javap` on the class you mentioned. 

➜ actors  pwd
/Users/mirco/Desktop/beta10/28/site_assembly/plugins/org.scala-ide.scala.library_2.8.2.r25648-b20110913024304/lib/scala-library-2.8.2/scala/actors

➜  actors  javap -private -s ReactorCanReply\$class        
Compiled from "ReactorCanReply.scala"
public abstract class scala.actors.ReactorCanReply$class extends java.lang.Object{
public static java.lang.Object $bang$qmark(scala.actors.ReplyReactor, java.lang.Object);
  Signature: (Lscala/actors/ReplyReactor;Ljava/lang/Object;)Ljava/lang/Object;
public static scala.Option $bang$qmark(scala.actors.ReplyReactor, long, java.lang.Object);
  Signature: (Lscala/actors/ReplyReactor;JLjava/lang/Object;)Lscala/Option;
public static scala.actors.Future $bang$bang(scala.actors.ReplyReactor, java.lang.Object);
  Signature: (Lscala/actors/ReplyReactor;Ljava/lang/Object;)Lscala/actors/Future;
public static scala.actors.Future $bang$bang(scala.actors.ReplyReactor, java.lang.Object, scala.PartialFunction);
  Signature: (Lscala/actors/ReplyReactor;Ljava/lang/Object;Lscala/PartialFunction;)Lscala/actors/Future;
public static void $init$(scala.actors.ReplyReactor);
  Signature: (Lscala/actors/ReplyReactor;)V
}

Then I downloaded 2.8.1.final from the scala-lang.org website, and repeated the above procedure:

➜ actors  pwd                                     
/Users/mirco/Desktop/beta10/28/site_assembly/plugins/org.scala-ide.scala.library_2.8.2.r25648-b20110913024304/lib/scala-library-2.8.1/scala/actors
➜  actors  javap -private -s ReactorCanReply\$class
Compiled from "ReactorCanReply.scala"
public abstract class scala.actors.ReactorCanReply$class extends java.lang.Object{
public static java.lang.Object $bang$qmark(scala.actors.ReplyReactor, java.lang.Object);
  Signature: (Lscala/actors/ReplyReactor;Ljava/lang/Object;)Ljava/lang/Object;
public static scala.Option $bang$qmark(scala.actors.ReplyReactor, long, java.lang.Object);
  Signature: (Lscala/actors/ReplyReactor;JLjava/lang/Object;)Lscala/Option;
public static scala.actors.Future $bang$bang(scala.actors.ReplyReactor, java.lang.Object);
  Signature: (Lscala/actors/ReplyReactor;Ljava/lang/Object;)Lscala/actors/Future;
public static scala.actors.Future $bang$bang(scala.actors.ReplyReactor, java.lang.Object, scala.PartialFunction);
  Signature: (Lscala/actors/ReplyReactor;Ljava/lang/Object;Lscala/PartialFunction;)Lscala/actors/Future;
public static void $init$(scala.actors.ReplyReactor);
  Signature: (Lscala/actors/ReplyReactor;)V
}

As you can see both classfiles have the same signature, and I couldn't find a method with the signature you mentioned

scala.actors.ReactorCanReply$class.$init$(Lscala/actors/
ReactorCanReply;)V

So I might be comparing the wrong libraries. Any idea? I'd be glad to look into this issue.

-- Mirco


Reply all
Reply to author
Forward
0 new messages