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:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user