Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Windows #208

Open
hubol opened this issue Dec 17, 2021 · 2 comments
Open

Build fails on Windows #208

hubol opened this issue Dec 17, 2021 · 2 comments

Comments

@hubol
Copy link
Contributor

hubol commented Dec 17, 2021

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:

var menu = electron.main.Menu.buildFromTemplate(template);

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?

@AustinEast
Copy link
Member

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.

@hubol
Copy link
Contributor Author

hubol commented Dec 17, 2021

Haxe Compiler is 4.1.3!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants