Haxe 4.0.0-rc.1 is released

On behalf of the Haxe Foundation, we are proud to announce the official release of the Haxe 4.0.0-rc.1! It is available along with the changelog at https://haxe.org/download.

The main new feature of this release is an experimental null-checker, which can be enabled for individual packages from command line by using --macro nullSafety("package.path") . We will post more information on this soon!

See the changelog below for further details. Please report any issues here: Issues · HaxeFoundation/haxe · GitHub

Thank you very much for your help!

22 Likes

Windows 32-bit binaries. Crashes at startup with 0xc00000fd. Can’t even --version. Google says it’s a stack overflow.

That works fine for me. What OS are you on?

XP SP2 (because reasons).
What happens is
step1: some function in haxe(?) calls WideCharToMultiByte, it returns 0. GetLastError gets called and returns something about flags being set wrong
step2: some function gets called which allocs memory on stack and calls FormatMessage
step3: after that it checks if FormatMessage failed (it didnt’t) and then calls the haxe function from step 1. Which make it an infinite recursion.
So function from step 1 probably has something to do with printing error messages.
The only flag for WCToMB that is not available on winxp is WC_ERR_INVALID_CHARS. Looks like ocaml’s fault.

Thank you for the details!

Did this fail in 4.0.0-preview.5 already?

No, preview 5 works fine. Except for haxelib whose binary is not xp compatible anymore, but I just used one from 3.2.

If you are testing null safety (like I just did), you might stumble on some errors.

For example I used var thing = null; in a function and got cannot assign nullable value here. This is an issue that is still open:

If you notice Safety: Cannot pass nullable value to not-nullable argument "v" of function "f". then there is a open issue for this too: