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:
@@ -346,7 +346,7 @@ class LazyModuleDependencies<M : ModuleInfo>(
|
|||||||
) : ModuleDependencies {
|
) : ModuleDependencies {
|
||||||
private val dependencies = storageManager.createLazyValue {
|
private val dependencies = storageManager.createLazyValue {
|
||||||
val moduleDescriptor = resolverForProject.descriptorForModule(module)
|
val moduleDescriptor = resolverForProject.descriptorForModule(module)
|
||||||
buildSequence<ModuleDescriptorImpl> {
|
buildSequence {
|
||||||
if (firstDependency != null) {
|
if (firstDependency != null) {
|
||||||
yield(resolverForProject.descriptorForModule(firstDependency))
|
yield(resolverForProject.descriptorForModule(firstDependency))
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -715,7 +715,7 @@ class DoubleColonExpressionResolver(
|
|||||||
?.apply { commitTrace() }?.results
|
?.apply { commitTrace() }?.results
|
||||||
}
|
}
|
||||||
|
|
||||||
val resultSequence = buildSequence<ResolutionResultsAndTraceCommitCallback> {
|
val resultSequence = buildSequence {
|
||||||
when (lhs) {
|
when (lhs) {
|
||||||
is DoubleColonLHS.Type -> {
|
is DoubleColonLHS.Type -> {
|
||||||
val classifier = lhsType.constructor.declarationDescriptor
|
val classifier = lhsType.constructor.declarationDescriptor
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ private class TestScriptDefinitionSource(val counter: AtomicInteger, val defGens
|
|||||||
{
|
{
|
||||||
constructor(counter: AtomicInteger, vararg suffixes: String) : this(counter, suffixes.map { { FakeScriptDefinition(it) } })
|
constructor(counter: AtomicInteger, vararg suffixes: String) : this(counter, suffixes.map { { FakeScriptDefinition(it) } })
|
||||||
|
|
||||||
override val definitions: Sequence<KotlinScriptDefinition> = buildSequence<FakeScriptDefinition> {
|
override val definitions: Sequence<KotlinScriptDefinition> = buildSequence {
|
||||||
for (gen in defGens) {
|
for (gen in defGens) {
|
||||||
counter.incrementAndGet()
|
counter.incrementAndGet()
|
||||||
yield(gen())
|
yield(gen())
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ private sealed class ModuleInfoCollector<out T>(
|
|||||||
emptySequence()
|
emptySequence()
|
||||||
},
|
},
|
||||||
virtualFileProcessor = { project, virtualFile, isLibrarySource ->
|
virtualFileProcessor = { project, virtualFile, isLibrarySource ->
|
||||||
buildSequence<IdeaModuleInfo> {
|
buildSequence {
|
||||||
collectInfosByVirtualFile(
|
collectInfosByVirtualFile(
|
||||||
project,
|
project,
|
||||||
virtualFile,
|
virtualFile,
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ private class TemplateTokenSequence(private val inputString: String) : Sequence<
|
|||||||
if (inputString.isEmpty()) {
|
if (inputString.isEmpty()) {
|
||||||
return emptySequence<TemplateChunk>().iterator()
|
return emptySequence<TemplateChunk>().iterator()
|
||||||
}
|
}
|
||||||
return buildIterator<TemplateChunk> {
|
return buildIterator {
|
||||||
var from = 0
|
var from = 0
|
||||||
var to = 0
|
var to = 0
|
||||||
while (to < inputString.length) {
|
while (to < inputString.length) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ fun templateGroupOf(vararg templates: MemberTemplate): TemplateGroup = { templat
|
|||||||
|
|
||||||
abstract class TemplateGroupBase : TemplateGroup {
|
abstract class TemplateGroupBase : TemplateGroup {
|
||||||
|
|
||||||
override fun invoke(): Sequence<MemberTemplate> = buildSequence<MemberTemplate> {
|
override fun invoke(): Sequence<MemberTemplate> = buildSequence {
|
||||||
with(this@TemplateGroupBase) {
|
with(this@TemplateGroupBase) {
|
||||||
this::class.members.filter { it.name.startsWith("f_") }.forEach {
|
this::class.members.filter { it.name.startsWith("f_") }.forEach {
|
||||||
require(it.parameters.size == 1) { "Member $it violates naming convention" }
|
require(it.parameters.size == 1) { "Member $it violates naming convention" }
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ class FamilyPrimitiveMemberDefinition : MemberTemplateDefinition<PrimitiveType?>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun parametrize(): Sequence<Pair<Family, PrimitiveType?>> = buildSequence<Pair<Family, PrimitiveType?>> {
|
override fun parametrize(): Sequence<Pair<Family, PrimitiveType?>> = buildSequence {
|
||||||
for ((family, primitives) in familyPrimitives) {
|
for ((family, primitives) in familyPrimitives) {
|
||||||
if (primitives.isEmpty())
|
if (primitives.isEmpty())
|
||||||
yield(family to null)
|
yield(family to null)
|
||||||
|
|||||||
+2
-2
@@ -45,7 +45,7 @@ internal fun discoverScriptTemplatesInClasspath(
|
|||||||
baseClassLoader: ClassLoader,
|
baseClassLoader: ClassLoader,
|
||||||
scriptResolverEnv: Map<String, Any?>,
|
scriptResolverEnv: Map<String, Any?>,
|
||||||
messageCollector: MessageCollector
|
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
|
// 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 }
|
val loader = LazyClasspathWithClassLoader(baseClassLoader) { classpath }
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ internal fun loadScriptTemplatesFromClasspath(
|
|||||||
messageCollector: MessageCollector
|
messageCollector: MessageCollector
|
||||||
): Sequence<KotlinScriptDefinition> =
|
): Sequence<KotlinScriptDefinition> =
|
||||||
if (scriptTemplates.isEmpty()) emptySequence()
|
if (scriptTemplates.isEmpty()) emptySequence()
|
||||||
else buildSequence<KotlinScriptDefinition> {
|
else buildSequence {
|
||||||
// trying the direct classloading from baseClassloader first, since this is the most performant variant
|
// trying the direct classloading from baseClassloader first, since this is the most performant variant
|
||||||
val (initialLoadedDefinitions, initialNotFoundTemplates) = scriptTemplates.partitionMapNotNull {
|
val (initialLoadedDefinitions, initialNotFoundTemplates) = scriptTemplates.partitionMapNotNull {
|
||||||
loadScriptDefinition(baseClassLoader, it, scriptResolverEnv, messageCollector)
|
loadScriptDefinition(baseClassLoader, it, scriptResolverEnv, messageCollector)
|
||||||
|
|||||||
Reference in New Issue
Block a user