Heaps 2.0.0 issues

Hi! I just noticed there’s a completely new version of heaps (2.0.0). Since I still used 1.10.0, and there was no official announcement (yet), I said sure… let’s try it!

But it seems my project won’t compile anymore. Here’s the error I get:

Unexpected ? [Ln 14, Col 33]

Meaning it doesn’t allow the second “?” in this line:

this.outputFile = outputFile ?? file;

from new() function inside haxe/lib/heaps/2,0,0/h3d/impl/ShaderCache.hx

Any ideas? Looks like it will need to be patched anyways

Thinking about it, could be related to the haxe version. It seems that I have Haxe compiler v4.2.5 installed, which I know that at the time I installed it, I had to downgrade from the latest haxe version at the time, to make it compatible with the HashLink version (now seems that my HashLink was synced with git at some time).

To be honest, the simplest option for me now is to just revert to heaps 1.1.10, which will make my project compile again. I won’t be messing around anymore yet until I know a full stack of compatible versions for haxe, HL, heaps and any other related libraries (if needed)

I just ran into this issue myself - turns out, yeah, it’s the Haxe compiler version. Haxe 4.3 added the ?? null coalescing operator; before that, the line would have to be this.outputFile = outputFile != null ? outputFile : file;. Personally, I just updated haxe, but I was able to get things working after just changing that one line.

1 Like