Thread
#arrow-meta
    raulraja

    raulraja

    3 years ago
    @dsavvinov @dmitriy.novozhilov in case any of you can help with the reason and alternatives. I’m getting this error when attempting to modify a Psi node in the SyntenthicResolverExtensions.generateSyntheticClasses(PackageDescriptor...):
    Caused by: java.util.MissingResourceException: Can't find bundle for base name messages.PsiBundle, locale en_GB
    	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1581)
    	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1396)
    	at java.util.ResourceBundle.getBundle(ResourceBundle.java:782)
    	at org.jetbrains.kotlin.com.intellij.psi.PsiBundle.getBundle(PsiBundle.java:45)
    	at org.jetbrains.kotlin.com.intellij.psi.PsiBundle.message(PsiBundle.java:33)
    	at org.jetbrains.kotlin.com.intellij.psi.impl.CheckUtil.checkWritable(CheckUtil.java:47)
    	at org.jetbrains.kotlin.com.intellij.extapi.psi.ASTDelegatePsiElement.replace(ASTDelegatePsiElement.java:371)
    kralli

    kralli

    3 years ago
    You cannot modify the PSI in the compiler. PSI modification is only supported in the IDE as it requires components that only exist there. Even if you were to hack the writable flag of the containing KtFile, it would still be just the beginning of a long list of really bad exceptions. You will have to transform your tree during code generation.
    raulraja

    raulraja

    3 years ago
    makes sense thanks