Errors when trying to make an html5 build after updating to Haxe 4

Hi.

It’s probably not an OpenFL issue as I don’t see any reports like mine but I still hope to find any help as I don’t even know where to look.

The problem is that after updating Haxe to 4.0.0-rc.3 I can’t no longer make html5 builds. Native and neko builds work just fine however (I’m getting some deprecation warnings on neko but it build nevertheless).

I’m just running openfl build html5 in a freshly created project with openfl create project [prject-name] and getting these errors:

/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/VertexBuffer3D.hx:181: characters 24-42 : openfl._internal.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/VertexBuffer3D.hx:181: characters 24-42 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/IndexBuffer3D.hx:143: characters 24-41 : openfl._internal.utils.UInt16Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/IndexBuffer3D.hx:143: characters 24-41 : For function argument 'data'
/home/michael/haxelib/lime/7,5,0/src/lime/graphics/ImageBuffer.hx:139: characters 30-34 : lime.utils.UInt8Array should be Null<Int>
/home/michael/haxelib/lime/7,5,0/src/lime/graphics/ImageBuffer.hx:139: characters 30-34 : For optional function argument 'elements'
/home/michael/haxelib/lime/7,5,0/src/lime/math/ColorMatrix.hx:96: characters 43-47 : lime.utils.Float32Array should be Null<Int>
/home/michael/haxelib/lime/7,5,0/src/lime/math/ColorMatrix.hx:96: characters 43-47 : For optional function argument 'elements'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/CubeTexture.hx:173: characters 24-34 : lime.utils.UInt8Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/CubeTexture.hx:173: characters 24-34 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/CubeTexture.hx:214: characters 24-77 : lime.utils.UInt8Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/CubeTexture.hx:214: characters 24-77 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/RectangleTexture.hx:75: characters 24-34 : lime.utils.UInt8Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/RectangleTexture.hx:75: characters 24-34 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/RectangleTexture.hx:106: characters 24-77 : lime.utils.UInt8Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/RectangleTexture.hx:106: characters 24-77 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/Texture.hx:190: characters 24-34 : lime.utils.UInt8Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/Texture.hx:190: characters 24-34 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/Texture.hx:229: characters 24-77 : lime.utils.UInt8Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/textures/Texture.hx:229: characters 24-77 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/IndexBuffer3D.hx:83: characters 24-76 : lime.utils.UInt16Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/IndexBuffer3D.hx:83: characters 24-76 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/VertexBuffer3D.hx:113: characters 24-62 : lime.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/VertexBuffer3D.hx:113: characters 24-62 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/Context3D.hx:407: characters 42-46 : lime.utils.UInt16Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display3D/Context3D.hx:407: characters 42-46 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DBuffer.hx:83: characters 37-53 : openfl._internal.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DBuffer.hx:83: characters 37-53 : For function argument 'data'
/home/michael/haxelib/lime/7,5,0/src/lime/math/Matrix4.hx:119: characters 39-43 : lime.utils.Float32Array should be Null<Int>
/home/michael/haxelib/lime/7,5,0/src/lime/math/Matrix4.hx:119: characters 39-43 : For optional function argument 'elements'
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DGraphics.hx:331: characters 32-66 : openfl._internal.utils.UInt16Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DGraphics.hx:331: characters 32-66 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DGraphics.hx:345: characters 32-59 : openfl._internal.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DGraphics.hx:345: characters 32-59 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DGraphics.hx:359: characters 32-62 : openfl._internal.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/_internal/renderer/context3D/Context3DGraphics.hx:359: characters 32-62 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display/BitmapData.hx:1912: characters 40-58 : openfl._internal.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display/BitmapData.hx:1912: characters 40-58 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display/BitmapData.hx:1564: characters 39-56 : openfl._internal.utils.UInt16Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display/BitmapData.hx:1564: characters 39-56 : For function argument 'data'
/home/michael/haxelib/openfl/8,9,1/src/openfl/display/BitmapData.hx:3487: characters 40-58 : openfl._internal.utils.Float32Array should be openfl._internal.utils.ArrayBufferView
/home/michael/haxelib/openfl/8,9,1/src/openfl/display/BitmapData.hx:3487: characters 40-58 : For function argument 'data'

Any ideas on what can cause these errors and ways of fixing it?

I ran into similar problem with Heaps (I asked in their issue tracker on github: https://github.com/HeapsIO/heaps/issues/648) so it makes me think that I just misconfigured something rather than it’s being a problem with libraries I’m trying to use.

Any helps is appreciated!

Environment:
OS: Linux archlinux 4.19.59-1-lts #1 SMP Sun Jul 14 09:54:32 CEST 2019 x86_64 GNU/Linux
Haxe: Haxe Compiler 4.0.0-rc.3
Lime: Lime Command-Line Tools (7.5.0)
OpenFL: OpenFL Command-Line Tools (8.9.1-LoCUP5)

I think you may need Lime / OpenFL from GitHub for the latest Haxe version.

Oh, I see. For some reason I haven’t even considered the possibility of stable OpenFL being incompatible with the RC version of Haxe.

I’ll try the git version or just stick to the stable haxe compiler.

Thank you!

If that’s the case, it’s a linux thing.

I use haxe 4 rc3 with haxelib openfl on windows and macos and works perfectly.

1 Like

Actually, I think what it might be is that he’s using a nightly build of Haxe newer than rc.3.

That was the case. I used haxe-git package from AUR. I grabbed the binaries from the haxe website instead and now everything seems to be working perfectly.

Thank you!

1 Like