mirror of
https://github.com/enso-org/enso.git
synced 2024-11-24 00:27:16 +03:00
[release: nightly] Fix the compilation order (#1866)
This commit is contained in:
parent
3a9f0aa42b
commit
1a9af9f39e
@ -73,10 +73,10 @@ class EnsureCompiledJob(protected val files: Iterable[File])
|
|||||||
val modules = files.flatMap { file =>
|
val modules = files.flatMap { file =>
|
||||||
ctx.executionService.getContext.getModuleForFile(file).toScala
|
ctx.executionService.getContext.getModuleForFile(file).toScala
|
||||||
}
|
}
|
||||||
|
val moduleCompilationStatus = modules.map(ensureCompiledModule)
|
||||||
val modulesInScope =
|
val modulesInScope =
|
||||||
getModulesInScope.filterNot(m => modules.exists(_ == m))
|
getModulesInScope.filterNot(m => modules.exists(_ == m))
|
||||||
val moduleCompilationStatus = modules.map(ensureCompiledModule)
|
val scopeCompilationStatus = ensureCompiledScope(modulesInScope)
|
||||||
val scopeCompilationStatus = ensureCompiledScope(modulesInScope)
|
|
||||||
(moduleCompilationStatus ++ scopeCompilationStatus).maxOption
|
(moduleCompilationStatus ++ scopeCompilationStatus).maxOption
|
||||||
.getOrElse(CompilationStatus.Success)
|
.getOrElse(CompilationStatus.Success)
|
||||||
}
|
}
|
||||||
@ -439,12 +439,8 @@ class EnsureCompiledJob(protected val files: Iterable[File])
|
|||||||
/** Get all modules in the current compiler scope. */
|
/** Get all modules in the current compiler scope. */
|
||||||
private def getModulesInScope(implicit
|
private def getModulesInScope(implicit
|
||||||
ctx: RuntimeContext
|
ctx: RuntimeContext
|
||||||
): Iterable[Module] = {
|
): Iterable[Module] =
|
||||||
val topScope = ctx.executionService.getContext.getTopScope
|
ctx.executionService.getContext.getTopScope.getModules.asScala
|
||||||
val modulesInScope = topScope.getModules.asScala
|
|
||||||
val builtins = topScope.getBuiltins.getModule
|
|
||||||
modulesInScope ++ Seq(builtins)
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Get the module path for suggestions database indexing.
|
/** Get the module path for suggestions database indexing.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user