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
This commit is contained in:
Hubert Plociniczak 2024-09-04 16:44:37 +02:00 committed by GitHub
parent bc3ab2c7e1
commit ca2ab1ee02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -324,7 +324,7 @@ class MainModule(serverConfig: LanguageServerConfig, logLevel: Level) {
.logLevel(logLevel) .logLevel(logLevel)
.strictErrors(false) .strictErrors(false)
.disableLinting(false) .disableLinting(false)
.enableIrCaches(false) // Until #10921 is fixed .enableIrCaches(true)
.out(stdOut) .out(stdOut)
.err(stdErr) .err(stdErr)
.in(stdIn) .in(stdIn)

View File

@ -573,9 +573,8 @@ class Compiler(
context.updateModule( context.updateModule(
module, module,
u => { u => {
u.resetScope()
u.ir(updatedIr) u.ir(updatedIr)
u.compilationStage(CompilationStage.AFTER_PARSING) u.compilationStage(CompilationStage.AFTER_STATIC_PASSES)
} }
) )
} }