"Unable to build cache - completion features may be slower than expected..."

Hi,

I’m having constant troubles with vshaxe (I think; not actually sure what the hell is going on, so I don’t know where the error actually is).

I continuously get the following error popup in VS Code, basically all of the time whenever there is any error anywhere in the source:

"Unable to build cache - completion features may be slower than expected. Try fixing the error(s) and restarting the language server."

However, restarting the language server (F1 => Haxe: Restart Language Server) actually just brings up this same error again, always whenever there is any error.

Everything feels extremely flaky, like sometimes errors are caught, whereas at other times, compilation seems to be “successful”, in the sense that even though there are errors, my browser is started anyway (my targets are js and php, and I have -cmd start "" "C:\Program Files\Mozilla Firefox\firefox.exe" http://localhost/index.php in my hxml files).

Any help appreciated!

js.hxml:

-js bin/Commerce.js
-cp src
-D analyzer-optimize
-main Main
-dce full
-cmd start "" "C:\Program Files\Mozilla Firefox\firefox.exe" "http://localhost/index.php"

php.hxml:

-php bin
-cp src
-D analyzer-optimize
-main Main
-dce full
-cmd start "" "C:\Program Files\Mozilla Firefox\firefox.exe" "http://localhost/index.php"

all.hxml:

-cp src
-D analyzer-optimize
-main Main
-dce full
--each
-js bin/Commerce.js
--next
-php bin
--next
-cmd start "" "C:\Program Files\Mozilla Firefox\firefox.exe" "http://localhost/index.php"

All versions the latest.

Are you sure you actually fixed the error then?

1 Like

When you (or vshaxe for that matter) say “error”, do you mean a syntax error, or some error in vshaxe that causes the popup to appear?

What does:

"Unable to build cache - completion features may be slower than expected. Try fixing the error(s) and restarting the language server."

actually mean?

Why does it pop up?

Probably related issue is that sometimes syntax errors show up under the “problems” tab, and sometimes in the “debug console” tab:

x1

x2

I really have no clue what is going on.

Because there’s an error somewhere in your code, so the build fails. Just click the “Show Error” button to see what it is.

1 Like

Then why doesn’t it always show up?

Here I have introduced an error into my code, and the error shows up under the “problems” tab, but for some reason this time NO dialog comes up.
It’s entirely unpredicatable:

Now I changed the error somewhat, changed configuration from php.hxml to all.hxml (dialog comes up), then back to php.hxml again (this time dialog does come up, unlike in the previous screenshot):

The popup is for the completion cache build. The completion cache is built on startup, or when you switch configurations. The errors from the completion cache build don’t show up in the problems panel, just in the output channel where the “show error” button takes you.

2 Likes

Is there any way to suppress the dialog (it’s just very annoying and doesn’t provide any additional useful info)?

Also, is there any way to make any syntax errors always show up under the “problem” tab, where I can actually click on the error to bring me to the right error spot?

As I said, sometimes the error only shows up under the “debug console” tab, and in there, clicking doesn’t bring me to the error…

Many thanks!

"haxe.enableCompletionCacheWarning": false

I’m not sure when that happens, but it’s unrelated to the completion cache.

1 Like

Many thanks.