nyavro / i18nPlugin

Intellij idea i18next support plugin
MIT License
72 stars 12 forks source link

java.lang.StackOverflowError #205

Open SCjona opened 1 year ago

SCjona commented 1 year ago

IDE: Webstorm Plugin Version: 2.8.4

Stacktrace (truncated due to 64kb limit on Github issues) ``` at com.eny.i18n.extensions.lang.js.JsReferenceAssistant$pattern$1.isAlias(JsReferenceAssistant.kt:34) at com.eny.i18n.extensions.lang.js.JsReferenceAssistant$pattern$1.accepts(JsReferenceAssistant.kt:43) at com.intellij.psi.impl.source.resolve.reference.NamedObjectProviderBinding.addMatchingProviders(NamedObjectProviderBinding.java:88) at com.intellij.psi.impl.source.resolve.reference.SimpleProviderBinding.addAcceptableReferenceProviders(SimpleProviderBinding.java:26) at com.intellij.psi.impl.source.resolve.reference.PsiReferenceRegistrarImpl.getPairsByElement(PsiReferenceRegistrarImpl.java:187) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:140) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:39) at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:247) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:69) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:155) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:121) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:38) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:31) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.createRefs(JSLiteralExpressionImpl.java:105) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.lambda$static$0(JSLiteralExpressionImpl.java:80) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:46) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:247) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:82) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.getReferences(JSLiteralExpressionImpl.java:90) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.getReference(JSLiteralExpressionImpl.java:85) at com.eny.i18n.extensions.lang.js.JsReferenceAssistant$pattern$1.isAlias(JsReferenceAssistant.kt:34) at com.eny.i18n.extensions.lang.js.JsReferenceAssistant$pattern$1.accepts(JsReferenceAssistant.kt:43) at com.intellij.psi.impl.source.resolve.reference.NamedObjectProviderBinding.addMatchingProviders(NamedObjectProviderBinding.java:88) at com.intellij.psi.impl.source.resolve.reference.SimpleProviderBinding.addAcceptableReferenceProviders(SimpleProviderBinding.java:26) at com.intellij.psi.impl.source.resolve.reference.PsiReferenceRegistrarImpl.getPairsByElement(PsiReferenceRegistrarImpl.java:187) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:140) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:39) at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158) at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:247) at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:69) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:155) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:121) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:38) at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:31) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.createRefs(JSLiteralExpressionImpl.java:105) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.lambda$static$0(JSLiteralExpressionImpl.java:80) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.java:46) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:244) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:247) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.java:35) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:82) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.getReferences(JSLiteralExpressionImpl.java:90) at com.intellij.lang.javascript.psi.impl.JSLiteralExpressionImpl.getReference(JSLiteralExpressionImpl.java:85) at com.eny.i18n.extensions.lang.js.JsReferenceAssistant$pattern$1.isAlias(JsReferenceAssistant.kt:34) ```

Full Stacktrace

Code that caused this error:

const BREAKPOINTS = {
  // snip
  sm: 600,
  // snip
};
const foo = {
  // snip, the following statement causes this error, rewriting this to use normal string concat instead of template string makes the error go away
  [`@media (min-width: ${BREAKPOINTS.sm}px)`]: {
    minWidth: 160,
  },
  // snip
}