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

Compile error, File "src/core/globals.ml", line 117, characters 1-7: Assertion failed #11316

Closed
wu-lee opened this issue Sep 24, 2023 · 3 comments

Comments

@wu-lee
Copy link

wu-lee commented Sep 24, 2023

What's wrong: I have been using Haxe / HaxeFlixel happily for a while, and now it's suddenly stopped building, printing an error. Versions below.

What's expected: HaxeFlixel projects which used to work should continue to build and run without errors.

There were various errors as I tried different things (notably VS Code popping up a dialog saying "Unable to build cache", but I suspect a broken haxe/flixel install due to some sort of automated software upgrade. (This is my son's computer so I don't have full information about what was upgraded, he claims nothing manually.) Currently a lime build fails with what seems to be a Haxe compiler error like this, even when building a known-working project like the TurnBasedRPG demo:

PS C:\[...]\haxe\TurnBasedRPG> lime build hl --verbose
Compiler failure
Please submit an issue at https://github.com/HaxeFoundation/haxe/issues/new
Attach the following information:
Haxe: 4.2.5; OS type: windows;
File "src/compiler/haxe.ml", line 285, characters 179-186
Called from file "src/compiler/haxe.ml", line 285, characters 172-186
Called from file "src/compiler/haxe.ml", line 1040, characters 11-55
Called from file "src/compiler/haxe.ml", line 642, characters 3-11
Called from file "src/compiler/haxe.ml", line 1247, characters 1-35
File "src/core/globals.ml", line 117, characters 1-7: Assertion failed

The error I'm seeing appears elsewhere in the issues, notabaly here #10434, but it looks to me like they were fixed some time ago.

The Haxe version here is 4.2.5 because I was using 4.3.2 and downgraded incrementally until I got to this version, which was known to be working earlier. I have a suspicion there may have been some windows updates, then when I started hitting errors I ran haxelib update, so one or both updated the compiler.

Using:

  • Windows 10 Pro
  • VS Code
  • Haxe 4.2.5 ... 4.3.2
  • haxelib list
    • flixel-addons: [3.2.0]
    • flixel: [5.3.1]
    • lime: [8.0.2]
    • openfl: [9.2.2]
@RblSb
Copy link
Member

RblSb commented Sep 24, 2023

This is different error, your is comes from this line:
https://github.com/HaxeFoundation/haxe/blob/4.2_bugfix/src/compiler/haxe.ml#L285

Just like in this fixed issue: #11086
Check solution from there, you probably need to set HAXE_STD_PATH.
It was already fixed, but not in 4.3 hotfix yet.

@Simn
Copy link
Member

Simn commented Sep 25, 2023

Indeed, tracked in #11306.

@Simn Simn closed this as completed Sep 25, 2023
@wu-lee
Copy link
Author

wu-lee commented Sep 26, 2023

Thanks, setting this variable HAXE_STD_PATH in the vscode terminal and then building with lime build html5 successfully builds now. I've also set it in the system environment and restarted VSCode.

However, something is still setting that variable to something else when VS Code runs the build:

Haxe language server started
Haxe Path: haxe.exe
Using --server-connect
Haxe connected!
Listening on port 127.0.0.1:6000
Failed - Standard library not found. Please check your `HAXE_STD_PATH` environment variable (current value: "C:\Users\Tom Lowell\Nextcloud\programming\haxe\elasticSim\export\html5\bin\node_modules\haxe\bin/../std")
Haxe server restart requested: DisplayArguments configuration was changed
Haxe Path: haxe.exe
Using --server-connect
Haxe connected!
Restarted Haxe server: DisplayArguments configuration was changed
Failed - try fixing the error(s) and restarting the language server:

File "src/core/globals.ml", line 117, characters 1-7: Assertion failed
[Error - 9:30:18 AM] Request textDocument/hover failed.
  Message: File "src/core/globals.ml", line 117, characters 1-7: Assertion failed
  Code: -32603 

I think I need to track that down, which might be out of the scope of this project. But possibly you happen to know where I should look? I'm fairly new to Haxe, VSCode, and in fact usually work on Linux...

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

3 participants