IntelliJ-EmmyLua icon indicating copy to clipboard operation
IntelliJ-EmmyLua copied to clipboard

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

Open Shinzuh opened this issue 1 year ago • 3 comments

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 = {}
  1. Go in another file and set a key to "firstKey" array : TEST.firstKey.secondKey = "cool"
  2. 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

Shinzuh avatar Feb 17 '24 00:02 Shinzuh

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.

CppCXY avatar Feb 18 '24 01:02 CppCXY

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

Shinzuh avatar Feb 18 '24 15:02 Shinzuh

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.

CppCXY avatar Feb 19 '24 02:02 CppCXY