Revert "Migration change: temporarily specify type explicitly"

This reverts commit bc6e091004.

 This commit was needed to avoid bootstraping, now we can revert it
This commit is contained in:
Mikhail Zarechenskiy
2018-09-24 13:12:02 +03:00
parent 7c1d374ed5
commit 0da1b9b80f
8 changed files with 9 additions and 9 deletions
@@ -45,7 +45,7 @@ internal fun discoverScriptTemplatesInClasspath(
baseClassLoader: ClassLoader,
scriptResolverEnv: Map<String, Any?>,
messageCollector: MessageCollector
): Sequence<KotlinScriptDefinition> = buildSequence<KotlinScriptDefinition> {
): Sequence<KotlinScriptDefinition> = buildSequence {
// TODO: try to find a way to reduce classpath (and classloader) to minimal one needed to load script definition and its dependencies
val loader = LazyClasspathWithClassLoader(baseClassLoader) { classpath }
@@ -133,7 +133,7 @@ internal fun loadScriptTemplatesFromClasspath(
messageCollector: MessageCollector
): Sequence<KotlinScriptDefinition> =
if (scriptTemplates.isEmpty()) emptySequence()
else buildSequence<KotlinScriptDefinition> {
else buildSequence {
// trying the direct classloading from baseClassloader first, since this is the most performant variant
val (initialLoadedDefinitions, initialNotFoundTemplates) = scriptTemplates.partitionMapNotNull {
loadScriptDefinition(baseClassLoader, it, scriptResolverEnv, messageCollector)