Skip to content

Commit fa5cba4

Browse files
hubertpjdunkerley
authored andcommitted
Re-enable IR caching in Language Server (#10960)
* Re-enable IR caching in Language Server When an IR loaded from cache is being run through the same passes, "interesting" errors may happen. We must ensure that IR is not run through phases that have already done their transformations. With this change, I'm no longer seeing failures after project startup. * resetScope is also obsolete * address PR review (cherry picked from commit ca2ab1e)
1 parent f314635 commit fa5cba4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

engine/language-server/src/main/scala/org/enso/languageserver/boot/MainModule.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: Level) {
324324
.logLevel(logLevel)
325325
.strictErrors(false)
326326
.disableLinting(false)
327-
.enableIrCaches(false) // Until #10921 is fixed
327+
.enableIrCaches(true)
328328
.out(stdOut)
329329
.err(stdErr)
330330
.in(stdIn)

engine/runtime-compiler/src/main/scala/org/enso/compiler/Compiler.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,8 @@ class Compiler(
573573
context.updateModule(
574574
module,
575575
u => {
576-
u.resetScope()
577576
u.ir(updatedIr)
578-
u.compilationStage(CompilationStage.AFTER_PARSING)
577+
u.compilationStage(CompilationStage.AFTER_STATIC_PASSES)
579578
}
580579
)
581580
}

0 commit comments

Comments
 (0)