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)
.strictErrors(false)
.disableLinting(false)
.enableIrCaches(false) // Until #10921 is fixed
.enableIrCaches(true)
.out(stdOut)
.err(stdErr)
.in(stdIn)

View File

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