Hello, I’m using developing for IDEA 2025.1 and I’ve made a lot of painful progress on making a plugin that can make the IDE syntax highlight my scripts.
Sadly adding the ability to import other scripts isn’t quite working, and after I’ve fixed other related issues, this error started appearing:
2025-04-22 21:12:01,807 [ 151175] WARN - #c.i.w.i.i.WorkspaceModelCacheSerializer - Workspace model cache was not serialized
com.intellij.platform.workspace.storage.metadata.exceptions.MissingTypeMetadataException: Metadata for the org.jetbrains.kotlin.idea.core.script.k2.KotlinDependentScriptModuleEntitySource was not collected. Please run the generator for the class org.jetbrains.kotlin.idea.core.script.k2.KotlinDependentScriptModuleEntitySource
at com.intellij.platform.workspace.storage.metadata.MetadataStorage.getMetadataByTypeFqn(apiCode.kt:32)
at com.intellij.platform.workspace.storage.metadata.resolver.TypeMetadataResolverImpl.resolveTypeMetadata(TypeMetadataResolver.kt:43)
at com.intellij.platform.workspace.storage.impl.serialization.CacheMetadata$MutableCacheMetadata.add(CacheMetadata.kt:87)
at com.intellij.platform.workspace.storage.impl.serialization.CacheMetadata$MutableCacheMetadata.addAll(CacheMetadata.kt:93)
at com.intellij.platform.workspace.storage.impl.serialization.CacheMetadataKt.getCacheMetadata(CacheMetadata.kt:56)
at com.intellij.platform.workspace.storage.impl.serialization.EntityStorageSerializerImpl.serializeCache(EntityStorageSerializerImpl.kt:115)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelCacheSerializer.saveCacheToFile$intellij_platform_ide_impl(WorkspaceModelCacheSerializer.kt:82)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelCacheImpl.doCacheSaving(WorkspaceModelCacheImpl.kt:133)
at com.intellij.workspaceModel.ide.impl.WorkspaceModelCacheImpl.doCacheSavingOnProjectClose(WorkspaceModelCacheImpl.kt:114)
at com.intellij.configurationStore.ProjectWithModuleStoreImpl.saveModules$intellij_platform_configurationStore_impl(ProjectStoreBridge.kt:84)
at com.intellij.configurationStore.ProjectStoreImpl$doSave$2$1.invokeSuspend(ProjectStoreImpl.kt:378)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
With no other related error etc, and I have absolutely no idea on what it may be related to so I could look into fixing it.
I’ve triple checked that I correctly add all the FileScriptSource to ScriptCompilationConfigurationKeys.importScripts, and that all of them indeed point to the desired files.
If anyone have any idea that may help me I’ll be really glad to hear all of them.