Lost code completion on my projects

So today I noticed that my projects don’t have code completion anymore.
(Neither in Kode nor in VSCode with the extensions…)

The examples (armory_examples-20.07) still do.
Any idea what might cause this?
Anyone had that problem at some point as well?

1 Like

I think this may have a generic solution like this one: https://stackoverflow.com/questions/908489/eclipse-java-code-completion-not-working

Anyone had that problem at some point as well?

Yes, now and then and I couldn’t find the cause yet. The extensions as well as Kode Studio weren’t updated in a long time, maybe there are some issues with that (but Robert often said that he will probably update them when he gets a bit of time for that). Also, I have the feeling that when building html5 the completion works and when building Krom it doesn’t but I never really tested that.

Soooo… Today I spend a lot of time to get to the bottom of this
and I think I have found what breaks the code-completion (because
Haxe won’t start to build cache and parse class-paths…)

I lose code completion when a subproject is present. (In this actual case “Koui”)
Because Kha adds an await in front of project.addProject(“xyz”) in khafile.js.
I am not sure why this “await” breaks cc, but somehow it does.

So in this case I drilled it down to this line in kha.js:
await project.addProject("Subprojects/Koui");

When I remove the await, Haxe will build cache and parse classpath, so
code completion works again. However, I then obviously get Type not found errors
for the (in this case) Koui types. Also on rebuild in Blender, the “await” gets added again
and code completion is lost again.

This is recreatable 100% any time in any project where a subproject folder is present.
So now I know what the problem is, I just can’t think of any solution to this…
Any Ideas?

2 Likes

Looks like a potential khamake or vscode-kha issue, but I’m not sure.

1 Like

Hmm. Yeah, it’s khafile.js so I think I’ll file an issue with kha-make. Let’s see.
Robert seems to be very picky if issues aren’t filed where they belong… :smile_cat:

2 Likes