Folks,

The 280_port of Lift properly compiles and runs the Lift demo application
against the Scala 2.8.0 nightly.

I spent most of today tracking down a bug that I can't reproduce in
isolation, but it seems that the ensureCapacity method in Scala's
StringBuilder method has an infinite:

def ensureCapacity(n: Int)
{117<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L117>
  if (n > array.length)
{118<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L118>
    var newsize = array.length *
2119<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L119>
    while (n > 
newsize)120<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L120>
      newsize = newsize *
2121<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L121>
    val newar = new
Array[Char](newsize)122<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L122>
    arraycopy(array, 0, newar, 0,
count)123<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L123>
    array = 
newar124<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L124>
  
}125<http://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/library/scala/collection/mutable/StringBuilder.scala?view=markup#L125>
}
I saw an infinite loop in lines 119/120 (it was line 115 in the version I
was testing against).  I replaced Scala's StringBuilder with the Java native
code and all worked just fine.  It might be worth a gander at the byte-code
for StringBuilder to see how an infinite loop could happen.

Anyway, I'm looking forward to the next drop of a stable 2.8.0 so I can
compile against Specs and get a more complete (read: passes tests... right
now the tests are commented out because I don't have the
Specs/ScalaCheck/etc. chain in the 2.8.0 nightly).

Thanks,

David

-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=.


Reply via email to