diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-28 10:54:51 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-28 11:53:52 -0400 |
commit | bb7018817c0f41fb867cf9e81fe6f772c79bfafd (patch) | |
tree | a691b36a50b05e35f213cfce744853c2f042eb6e /stage1 | |
parent | bd75b5af0161013b26e2feda9cfcc1e152926071 (diff) | |
download | cbt-bb7018817c0f41fb867cf9e81fe6f772c79bfafd.tar.gz cbt-bb7018817c0f41fb867cf9e81fe6f772c79bfafd.tar.bz2 cbt-bb7018817c0f41fb867cf9e81fe6f772c79bfafd.zip |
replace Scala reflection with Java reflection seems to fix the weird exceptions that happened in the previous commit. Also gets rid of scala.reflect dependency in stage2.
Diffstat (limited to 'stage1')
-rw-r--r-- | stage1/Stage1.scala | 1 | ||||
-rw-r--r-- | stage1/Stage1Lib.scala | 16 |
2 files changed, 0 insertions, 17 deletions
diff --git a/stage1/Stage1.scala b/stage1/Stage1.scala index 7278fcf..36921be 100644 --- a/stage1/Stage1.scala +++ b/stage1/Stage1.scala @@ -55,7 +55,6 @@ object Stage1{ val deps = Dependencies( JavaDependency("net.incongru.watchservice","barbary-watchservice","1.0"), - JavaDependency("org.scala-lang","scala-reflect",constants.scalaVersion), JavaDependency("org.eclipse.jgit", "org.eclipse.jgit", "4.2.0.201601211800-r") ) diff --git a/stage1/Stage1Lib.scala b/stage1/Stage1Lib.scala index c8af672..69b828b 100644 --- a/stage1/Stage1Lib.scala +++ b/stage1/Stage1Lib.scala @@ -42,22 +42,6 @@ class Stage1Lib( val logger: Logger ) extends BaseLib{ def scalaMajorVersion(scalaMinorVersion: String) = scalaMinorVersion.split("\\.").take(2).mkString(".") - // ========== reflection ========== - - /** Create instance of the given class via reflection */ - /* - def create(cls: String)(args: Any*)(classLoader: ClassLoader): Any = { - logger.composition( logger.showInvocation("Stage1Lib.create", (cls,args,classLoader)) ) - import scala.reflect.runtime.universe._ - val m = runtimeMirror(classLoader) - val sym = m.classSymbol(classLoader.loadClass(cls)) - val cm = m.reflectClass( sym.asClass ) - val tpe = sym.toType - val ctorm = cm.reflectConstructor( tpe.decl(termNames.CONSTRUCTOR).asMethod ) - ctorm(args:_*) - } - */ - // ========== file system / net ========== def array2hex(padTo: Int, array: Array[Byte]): String = { |