EmmyLua / IntelliJ-EmmyLua

Lua IDE/Debugger Plugin for IntelliJ IDEA
https://emmylua.github.io
Apache License 2.0
1.72k stars 285 forks source link

Adding a key to a global array in another file doesn't register the value type #577

Open Shinzuh opened 4 months ago

Shinzuh commented 4 months ago

Environment(环境)

name version
IDEA version Latest
EmmyLua version Latest
OS Windows 11

What are the steps to reproduce this issue?(重现步骤?)

  1. Create a global with an array and a key containing an array, for exemple :
    TEST = {}
    TEST.firstKey = {}
  2. Go in another file and set a key to "firstKey" array : TEST.firstKey.secondKey = "cool"
  3. In the same second file (and any others) the secondKey will not give the string type image

It would be a cool feature to have since I'm forced to work with this amount of keys.

Love your work

CppCXY commented 4 months ago

This is the latest emmylua bug, I don't know when it will be fixed, the author cut a lot of normal features to fix the crush problem, and I don't know when it will be fixed.

Shinzuh commented 4 months ago

So if I understand correctly this was working someday. Do you know what commit caused the regression ? I'm exploring the project but I struggle a bit, this would be a precious information

CppCXY commented 4 months ago

This is a problem with the entire design. JetBrains does not allow certain computations during indexing, which can lead to freezes. To solve the freezing issue, EmmyLua can only cut off these contents. A more thorough solution is to not use IntelliJ's plugin mechanism but to use an independent backend to analyze the code, just like the CLion Nova.