Openfl rebuild tools errors

Hey Franky!

It’s been a while, is it? :wink:
I ran into the exact same problem (and error message) as you. After some more investigation I stumbled over another thread of you, where you mentioned you could fix it by making the latest installed openfl version the active.

Well, I wanted to rebuild openfl 8.6.4 and the latest installed openfl version is 9.0.2
So after

haxelib set openfl 9.0.2

followed by

openfl rebuild tools

(inside the appropriate openfl\8,6,4\assets\templates\bin folder)
the error indeed went away but it didn’t actually rebuild the tools. I kept a backup of the tools.n file for comparison and there was no change after rebuilding. So it seems it just silently fails.

There’s good news though. After some more investigation I come to the conclusion that the whole rebuilding partly depends on the haxe format library.

As the latest version of format has been 3.4.1 at the time openfl 8.6.4 was released, I manually downgraded format to that version

haxelib install format 3.4.1
haxelib set format 3.4.1

retried the rebuilding and les voilà - it worked!

So in case you also wanted to rebuild the tools of an older openfl build, I’d say this is the way to go!

I’ve looked for a matching format version here: https://github.com/HaxeFoundation/format/blob/master/CHANGES.txt

1 Like