Android Plugin Failure

2 views
Skip to first unread message

Ray Racine

unread,
Sep 22, 2009, 8:18:54 PM9/22/09
to simple-b...@googlegroups.com
I'm using an update-to-date SBT.  0.5.5-SNAPSHOT, 2.8.0-SNAPSHOT

I checkout out http://github.com/harrah/android-plugin

Changed project/build.properties

project.name=Android Plugin
sbt.version=0.5.5-SNAPSHOT
project.version=0.1.2
scala.version=2.8.0-SNAPSHOT

Launch SBT and try an "update"

I have a number of other projects with 0.5.5-SNAPSHOT and 2.8.0-SNAPSHOT where "update" works fine.

Looks to be down in Ivy, Reflection and new 2.8.0 stuff. 

info] == update ==
java.lang.UnsupportedOperationException: unsuitable as hash key
    at scala.Unhashable$class.hashCode(Unhashable.scala:38)
    at scala.runtime.BoxedArray.hashCode(BoxedArray.scala:26)
    at scala.runtime.ScalaRunTime$._hashCode(ScalaRunTime.scala:103)
    at sbt.ModuleID.hashCode(ManagedInterface.scala:57)
    at scala.collection.mutable.FlatHashTable$class.elemHashCode(FlatHashTable.scala:147)
    at scala.collection.immutable.HashSet.elemHashCode(HashSet.scala:29)
    at scala.collection.mutable.FlatHashTable$class.containsEntry(FlatHashTable.scala:56)
    at scala.collection.immutable.HashSet.containsEntry(HashSet.scala:29)

Mark Harrah

unread,
Sep 22, 2009, 10:30:32 PM9/22/09
to simple-b...@googlegroups.com
Ray,

Thanks for making it easy to reproduce. This is an open bug in 2.8:
https://lampsvn.epfl.ch/trac/scala/ticket/2088. The manifestation in sbt is
something like:

scala> def f(a: Int*) = a ++ Seq(1,2,3)
scala> f(3).hashCode
java.lang.UnsupportedOperationException: unsuitable as hash key
...

This immediate problem can be worked around by calling toList on the vararg
parameter (line 66 of ManagedInterface.scala), but the general bug will still
show up elsewhere.

-Mark
Reply all
Reply to author
Forward
0 new messages