Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Naggati doesn't compile on Scala 2.8 #2

ghost opened this Issue Jan 30, 2010 · 5 comments


None yet
2 participants

ghost commented Jan 30, 2010

ijuma has reworked Configgy to compile on Scala 2.8, but Naggati currently doesn't. Seeing how Scala 2.8 keeps marching closer, and now is gaining much wider acceptance, reworking Naggati to compile against it seems like a good idea. I'll be investigating this, but I'm new to Scala, so I don't know how much headway I'll be able to make.

cactus commented Jul 15, 2010

scala 2.8 is out now.


see git diff for naggatti 2.8 (make sure you assemble configgy and xrayspecs to 2.8.0 as well)

diff --git a/project/build.properties b/project/build.properties
index f84c304..49f7e69 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -4,5 +4,5 @@ project.name=naggati
diff --git a/project/build/NaggatiProject.scala b/project/build/NaggatiProject.scala
index be51e6f..9b0ee5b 100644
--- a/project/build/NaggatiProject.scala
+++ b/project/build/NaggatiProject.scala
@@ -3,11 +3,14 @@ import com.twitter.sbt.StandardProject

class NaggatiProject(info: ProjectInfo) extends StandardProject(info) {

  • val specs = "org.scala-tools.testing" % "specs" % ""
  • val xrayspecs = "com.twitter" % "xrayspecs" % "1.0.7"
  • val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
  • val specs = "org.scala-tools.testing" % "specs_2.8.0" % "1.6.6-SNAPSHOT"
  • val xrayspecs = "com.twitter" % "xrayspecs_2.8.0" % "1.1"
    val vscaladoc = "org.scala-tools" % "vscaladoc" % "1.1-md-3"
  • val configgy = "net.lag" % "configgy" % "1.5.3"
  • val configgy = "net.lag" % "configgy_2.8.0" % "1.5.4"
    val mina = "org.apache.mina" % "mina-core" % "2.0.0-M6"
    val slf4j_api = "org.slf4j" % "slf4j-api" % "1.5.2"
    val slf4j_jdk14 = "org.slf4j" % "slf4j-jdk14" % "1.5.2"
    diff --git a/src/main/scala/net/lag/naggati/asn1/Tag.scala b/src/main/scala/net/lag/naggati/asn1/Tag.scala
    index d5b9f12..7014a6d 100644
    --- a/src/main/scala/net/lag/naggati/asn1/Tag.scala
    +++ b/src/main/scala/net/lag/naggati/asn1/Tag.scala
    @@ -19,7 +19,7 @@ package net.lag.naggati.asn1
    import net.lag.extensions._
    import net.lag.naggati.ProtocolError

import net.lag.naggati.Steps._

+import net.lag.naggati._

object Tag {
abstract sealed case class Domain(value: Int)
diff --git a/src/test/scala/net/lag/naggati/asn1/TagSpec.scala b/src/test/scala/net/lag/naggati/asn1/TagSpec.scala
index 35a720f..6205003 100644
--- a/src/test/scala/net/lag/naggati/asn1/TagSpec.scala
+++ b/src/test/scala/net/lag/naggati/asn1/TagSpec.scala
@@ -22,6 +22,8 @@ import org.apache.mina.core.filterchain.IoFilter
import org.apache.mina.core.session.{DummySession, IoSession}
import org.apache.mina.filter.codec.ProtocolDecoderOutput
import org.specs._
+import net.lag.naggati.Decoder
+import net.lag.naggati.ProtocolError

object TagSpec extends Specification {

github mangled text from git diff, look for + and insert imports to classes, all Specs passed, in general 2.7 -> 2.8 conversion is not so bad, I am curious though if twitter has plans for 2.8 in the future, and if something is holding back (and why) that would be of great value to scala community:)


ghost commented Aug 3, 2010

Actually... I have a repository up on my GitHub with a 2.8 compatible version (I stripped out the ASN.1 stuff though). I sent a pull request to Robey, and he acknowledged that it needs to be done and he plans to do it.

great:) , btw, watch for warnings during compilation phase, there are subtle differences that could mean night and and day in the program flow, ie use of ++ under 2.8 , although compiler gives you nice "hints" was pleasantly surprised about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment