Open hubol opened 2 years ago
I updated electron to 12.0.4 with haxetoolkit. When I run the build or dev script I get:
ERROR in ./app.hxml Module Error (from ./node_modules/haxe-loader/index.js): C:\Users\Hubol\Projects\ogmo-editor\src/util/AppMenu.hx:94: characters 51-59 : have: Array<{ ?type, ?submenu, ?role, ?label, ?click, ?accelerator }> ERROR in ./app.hxml Module Error (from ./node_modules/haxe-loader/index.js): C:\Users\Hubol\Projects\ogmo-editor\src/util/AppMenu.hx:94: characters 51-59 : want: Array<haxe.extern.EitherType<..., ...>> ERROR in ./app.hxml Module Error (from ./node_modules/haxe-loader/index.js): C:\Users\Hubol\Projects\ogmo-editor\src/util/AppMenu.hx:94: characters 51-59 : For function argument 'template' ERROR in ./app.hxml Module Error (from ./node_modules/haxe-loader/index.js): C:\Users\Hubol\Projects\ogmo-editor\src/util/AppMenu.hx:94: characters 51-59 : error: { ?type : Null<String>, ?submenu : Null<Array<util.MenuTemplate>>, ?role : Null<String>, ?label : Null<String>, ?click : Null<Void -> Void>, ?accelerator : Null<String> } should be haxe.extern.EitherType<Dynamic, Dynamic> ERROR in ./app.hxml Module build failed (from ./node_modules/haxe-loader/index.js): Haxe Loader: Compilation failed haxe -debug -D webpack_namespace=app -lib electron -lib jQueryExtern -lib haxe-loader -cp "C:\Users\Hubol\Projects\ogmo-editor\src" -dce full -js C:\Users\Hubol\AppData\Local\Temp\tmp-53405ZWQ7NtXWP ec.js -main App -D "build_mode=development"
The line in question is: https://github.com/Ogmo-Editor-3/OgmoEditor3-CE/blob/8823acd2cdcac16e9b5f1f9600e3b7d885512ec0/src/util/AppMenu.hx#L94
If I suppress the error with a cast, like this, it works fine:
var menu = electron.main.Menu.buildFromTemplate(cast template);
Is the build broken for others?
What version of Haxe are you running? A couple of Haxe releases have come out since any major work has been done on Ogmo, so some changes for compatibility may be needed.
Haxe Compiler is 4.1.3!
I updated electron to 12.0.4 with haxetoolkit. When I run the build or dev script I get:
The line in question is: https://github.com/Ogmo-Editor-3/OgmoEditor3-CE/blob/8823acd2cdcac16e9b5f1f9600e3b7d885512ec0/src/util/AppMenu.hx#L94
If I suppress the error with a cast, like this, it works fine:
Is the build broken for others?