[SOLVED] Error compiling in heaps v1.7.0

Hi!

I’ve updated heaps from v1.6.1 to 1.7.0, and now I cannot compile my project anymore. It looks like there are some issues in the source of heaps.io itself:

C:\HaxeToolkit\haxe\lib\heaps/1,7,0/hxsl/MacroParser.hx:169: characters 18-24 : Unknown identifier : FNamed
C:\HaxeToolkit\haxe\lib\heaps/1,7,0/hxsl/BatchShader.hx:3: character 1 : Build failure

Any ideas on how to fix it?

Edit: here’s what I have installed:

C:\>haxelib list
actuate: 1.8.7 [1.8.9]
bezier: [1.0.4]
box2d: [1.2.3]
format: [3.4.2]
hashlink: [0.1.0]
haxelib: [3.3.0]
heaps: 1.6.1 [1.7.0]
hldx: 1.9.0 [1.10.0]
hlopenal: [1.5.0]
hlsdl: 1.9.0 [1.10.0]
hxcpp-debug-server: [dev:c:\Users\ASUS\.vscode\extensions\vshaxe.hxcpp-debugger-1.2.4\hxcpp-debug-server]
hxcpp: 4.0.4 4.0.8 [4.0.52]
hxp: 1.1.2 [1.1.4]
layout: [1.2.1]
lime-samples: [7.0.0]
lime: 7.0.0 7.2.0 7.2.1 7.3.0 7.6.0 [7.6.3]
openfl-gpg: [1.4.3]
openfl-samples: 8.4.0 [8.7.0]
openfl: 8.4.0 8.7.0 8.8.0 8.9.0 [8.9.5]
systools: [1.1.0]

Sounds like you’re using an outdated Haxe 4 build. Try updating to 4.0.0-rc.5.

1 Like

Yup, I had 4.0.0.rc-1. Still, upgrading to 4.0.0-rc.5 gives me new errors:

C:\HaxeToolkit\haxe\lib\format/3,4,2/format/amf3/Reader.hx:346: characters 11-29 : Warning : haxe.Utf8 is deprecated. Use UnicodeString instead.
C:\HaxeToolkit\haxe\lib\format/3,4,2/format/amf3/Reader.hx:372: characters 19-31 : Warning : haxe.Utf8 is deprecated. Use UnicodeString instead.
C:\HaxeToolkit\haxe\lib\format/3,4,2/format/amf3/Reader.hx:374: characters 22-34 : Warning : haxe.Utf8 is deprecated. Use UnicodeString instead.
C:\HaxeToolkit\haxe\lib\format/3,4,2/format/amf3/Tools.hx:73: characters 14-20 : Cannot use abstract as value

The “format” library is manually installed, but it seems that it’s a core library needed by haxe. Unfortunately, 3.4.2 is the latest version available, so it’s up to date.

I tried downgrading haxe to rc4, but I get the same errors (Cannot use abstract as value). Downgrading to rc3 gives me the initial Unknown identifier : FNamed error.

So, still not solved.

Does heaps v1.7.0 works for any of you? If so, what are your dependencies?

Try installing the format library from GitHub, there seems to have been a fix that’s not released to Haxelib yet:

haxelib git format https://github.com/HaxeFoundation/format
1 Like

After using the latest verstion of the format library from github (as you suggested) it compiles (I guess?), but before starting I get this error (in the debug console):

src\module.c(311) : FATAL ERROR : Failed to load function std@bytes_compare16

:frowning:

Well, that’s progress at least… :slight_smile: Your version of HashLink is probably outdated as well, 4.0.0-rc.5 targets HL 1.10: https://github.com/HaxeFoundation/hashlink/releases

1 Like

Yeah, that’s it!

Conclusion: SOLVED!

So, to UPDATE heaps, make sure you:

  1. Update all libraries:

C:\> haxelib update

  1. Update haxe to latest version from https://haxe.org/download/ (click on Haxe 4 is coming)

  2. Update HashLink to latest version from:
    https://github.com/HaxeFoundation/hashlink/releases

Download the latest zip file (e.g. hl-1.10.0-win.zip), extract it and copy it over the old folder, mine was c:\dev\hashLink, but make a backup copy first. To find out where your folder is, check your Environment Variables, then check the PATH variable (it should have something like (...)/hashLink)

  1. (OPTIONAL) If you still have issues with the format library, update it from the latest (non-haxelib) github repo:

haxelib git format https://github.com/HaxeFoundation/format

Thank you @Gama11 so much for all your help! I did it :smiley: <3