Skip to content

Commit eab005a

Browse files
committed
temporary fix for scala 2.12 (oswo)
1 parent d687639 commit eab005a

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

core/src/main/scala/gallia/oswo/OswoAtomFieldFormatter.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import aptus._
55

66
// ===========================================================================
77
private object OswoAtomFieldFormatter { import source.SourceFluentBuilders._
8-
private val DeserializeFunction = fullName(classOf[OswoSerDes.type]) + ".deserializeFunction[Any => Any]"
8+
private val DeserializeFunction =
9+
//fullName(classOf[OswoSerDes.type]) // fails for scala 2.12...
10+
"gallia.oswo.OswoSerDes" +
11+
".deserializeFunction[Any => Any]"
912

1013
// ===========================================================================
1114
private implicit class OswoKey_(key: Key) {

core/src/main/scala/gallia/oswo/OswoRun.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ object OswoRun
1515
head.end().runToNdt()
1616

1717
// ---------------------------------------------------------------------------
18-
val code = formatCode(FinalObjectName)(gallia.finalCode)
18+
val code = sourceCode(FinalObjectName)(gallia.finalCode)
1919
.tap { _.format.writeFileContent("/tmp/code.scala") }
2020

2121
// ---------------------------------------------------------------------------
2222
runtimeCompilation
23-
.objectInstance[gallia.oswo.OptimRunner](code.format, FinalObjectName)
23+
.objectInstance[OptimRunner](code.format, FinalObjectName)
2424
.run()
2525
.tap { _ =>
2626
val parentDir = "/home/tony/scl/gallia/gallia-core/core/src/main/scala/gallia/oswo/"
@@ -45,7 +45,7 @@ object OswoRun
4545
import source.SourceFluentBuilders._
4646

4747
// ---------------------------------------------------------------------------
48-
private def formatCode(name: Name)(body: String): SourceCode =
48+
private def sourceCode(name: Name)(body: String): SourceCode =
4949
_Object(_Name(name), fullName(classOf[gallia.oswo.OptimRunner]).in.list,
5050
// TODO: use macro to extract method name rather: mymacro[gallia.oswo.MyApp](body: Source)
5151
().methodDefinition("run").returnAny.body(body))

0 commit comments

Comments
 (0)