Expronicon.jl
Expronicon.jl copied to clipboard
ADT cannot be navigated in VS Code
I actually cannot think why this happens.
If I define a @config
(from Configurations.jl) in a file, I can include
the file and navigate to the definition from anywhere.
However, this does not happen with ADTs generated with Expronicon.ADT
. Any idea why?
@Roger-luo
I guess this is because we are mangling things by overloading getproperty
so the instance of ADT does not directly points to the type, which is why it confuses the IDE. I don't think there will be a good solution to this until we have native ADT support in the language.
I might change the ADT implementation to a module based implementation with more explicit generated type in the future due to some issues caused by 1.9 and 1.10 changes tho, which might make vscode happier
Glad to hear about it!
I figured it had to do with something like propertynames
, yeah. A pity not to have it for now, but well, it works like a charm for now.
What are the 1.9/1.10 changes I have to look out for? Performance drops?
I think https://github.com/Roger-luo/Moshi.jl/ should fix this problem but please feel free to open a new issue under Moshi if it happens.