apatrida
01/01/2017, 5:20 PMCurrently Kotlin scripting has code inSo therefore I would create a new module underand undercompiler/cli-common/…/repl, has acompiler/src/…/replwhich contains only script templates, and then all of that previously mentioned is used inscript-runtimekotlin-script-util
compiler that is compiler/scripting and that would contain both the base Repl and Scripting classes separated into packages common things repl specific. I think the JSR223 doesn’t need to stay here unless you want people to use the compiler JAR directly as a scripting engine, if so then we should add the JSR223 resources to the JAR to auto detect and find the engine. If not, the JSR223 support would move to a new libraries/kotlin-js223-engine that has this auto-detect behavior and two named engines kotlin and kotlin-daemon
*No scripting code would remain in cli-common *
The code in compiler/src/…/repl would only be the parts needed for interfacing with to cli and console / IDE. Look at unifying GenericRepl and ReplInterperter since they are really similar, and maybe your intent already.
For kotlin-script-util it basically maintains the resolvers and other templates that use the resolvers. This also could be a kotlinx project.
first change would be all the moves and build changes (ant, intellij IDEA project, and maven) with minimal code changes. The most dangerous item is unifying the two Repl I mention above so hold it for when the time is best to do so.
thoughts?