diff --git a/sbt-crossproject/src/main/scala/sbtcrossproject/CrossProjectMacros.scala b/sbt-crossproject/src/main/scala/sbtcrossproject/CrossProjectMacros.scala index 22ecf1a..04db213 100644 --- a/sbt-crossproject/src/main/scala/sbtcrossproject/CrossProjectMacros.scala +++ b/sbt-crossproject/src/main/scala/sbtcrossproject/CrossProjectMacros.scala @@ -25,18 +25,18 @@ private[sbtcrossproject] object CrossProjectMacros { val jsPlatform = Select( Select( - Ident(newTermName("_root_")), - newTermName("scalajscrossproject") + Ident(TermName("_root_")), + TermName("scalajscrossproject") ), - newTermName("JSPlatform") + TermName("JSPlatform") ) val jvmPlatform = Select( Select( - Ident(newTermName("_root_")), - newTermName("sbtcrossproject") + Ident(TermName("_root_")), + TermName("sbtcrossproject") ), - newTermName("JVMPlatform") + TermName("JVMPlatform") ) List(jsPlatform, jvmPlatform) @@ -45,16 +45,16 @@ private[sbtcrossproject] object CrossProjectMacros { val crossProjectCompanionTerm = Select( Select( - Ident(newTermName("_root_")), - newTermName("sbtcrossproject") + Ident(TermName("_root_")), + TermName("sbtcrossproject") ), - newTermName("CrossProject") + TermName("CrossProject") ) val applyFun = Select( crossProjectCompanionTerm, - newTermName("apply") + TermName("apply") ) c.Expr[CrossProject.Builder]( diff --git a/sbt-crossproject/src/main/scala/sbtcrossproject/MacroUtils.scala b/sbt-crossproject/src/main/scala/sbtcrossproject/MacroUtils.scala index 55d7f3e..0e76bb3 100644 --- a/sbt-crossproject/src/main/scala/sbtcrossproject/MacroUtils.scala +++ b/sbt-crossproject/src/main/scala/sbtcrossproject/MacroUtils.scala @@ -12,7 +12,7 @@ private[sbtcrossproject] object MacroUtils { val methodName = c.macroApplication.symbol.name // trim is not strictly correct, but macros don't expose the API necessary - def processName(n: Name): String = n.decoded.trim + def processName(n: Name): String = n.decodedName.toString.trim def enclosingVal(trees: List[c.Tree]): String = trees match { case vd @ ValDef(_, name, _, _) :: ts => @@ -27,7 +27,8 @@ private[sbtcrossproject] object MacroUtils { if mods.hasFlag(Flag.LAZY) => processName(name) case _ => - c.error(c.enclosingPosition, invalidEnclosingTree(methodName.decoded)) + c.error(c.enclosingPosition, + invalidEnclosingTree(methodName.decodedName.toString)) "" }