-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
[Haxe 5] Invalid_argument("List.iter2") at unknown position #11776
Comments
This comes from a call to |
Sorry for forgetting about this issue, migrating to Haxe 5 has been a lower priority for us. I made another attempt recently (this is with Haxe 5.0.0-alpha
|
Unfortunately we can't tell what lookup it's actually failing on from the stacktrace. What I can say is that this comes from some init macro, but there's not much more to go on. However, going through all Could you check if disabling some init macros changes anything here? |
After disabling This is an extremely basic macro though so I'm surprised it threw an error. (Of note, I am working with the Funkin' repository as it exists on the |
Could you check that your haxe/std is in-sync with the compiler? You're probably using an old haxe/macro/Compiler.hx which tries to call an API that no longer exists. We should definitely make this fail nicer though. |
So yes this is indeed a problem with class Main {
static function main() {
breakEverything();
}
static macro function breakEverything() {
eval.vm.Context.callMacroApi("oh no");
return macro null;
}
} |
Looks like you're right, I was switching to Haxe 5 by setting Here is an up-to-date error message: Backtrace
|
Could you try what I mention here (in haxe/macro/TypeTools.hx) and see if that tells us anything? |
Printing
|
Something is going quite wrong there. The type parameter is supposed to be something along the lines of I'll look into making this give a nicer error message, but I'm quite curious where this thing comes from. |
I've updated the compiler to give a different error for this. This probably won't tell you anything new though, the real question is still where this corrupt type parameter comes from. |
While the Backtrace[ERROR] (unknown position) | Error: Compiler failure | Please submit an issue at https://github.com/HaxeFoundation/haxe/issues/new | Attach the following information: | Haxe: 5.0.0-alpha.1+2f05f37; OS type: unix; | File "src/macro/eval/evalExceptions.ml", line 90, characters 20-27 | Called from file "src/macro/eval/evalExceptions.ml", line 93, characters 15-26 | Called from file "src/option.ml" (inlined), line 25, characters 14-17 | Called from file "src/macro/eval/evalExceptions.ml", line 123, characters 2-44 | Called from file "src/typing/macroContext.ml", line 818, characters 9-83 | Called from file "src/typing/macroContext.ml", line 976, characters 8-23 | Called from file "src/typing/typeloadFields.ml", line 400, characters 16-57 | Called from file "list.ml", line 110, characters 12-15 | Called from file "src/typing/typeloadFields.ml", line 430, characters 1-44 | Called from file "src/typing/typeloadFields.ml", line 618, characters 1-350 | Called from file "src/typing/typeloadFields.ml", line 1618, characters 14-48 | Called from file "src/typing/typeloadModule.ml", line 411, characters 5-64 | Called from file "src/typing/typeloadModule.ml", line 438, characters 44-58 | Called from file "src/context/typecore.ml", line 496, characters 4-7 | Called from file "src/context/typecore.ml" (inlined), line 510, characters 1-32 | Called from file "src/typing/macroContext.ml", line 66, characters 2-51 | Called from file "src/macro/macroApi.ml", line 1268, characters 18-61 | Called from file "src/macro/eval/evalEmitter.ml", line 83, characters 23-31 | Called from file "src/macro/eval/evalEmitter.ml", line 260, characters 7-18 | Called from file "src/macro/eval/evalEmitter.ml", line 266, characters 8-19 | Called from file "src/macro/eval/evalEmitter.ml", line 260, characters 7-18 | Called from file "src/macro/eval/evalEmitter.ml", line 766, characters 9-17 | Called from file "src/macro/eval/evalEmitter.ml", line 473, characters 9-17 | |
Reproduction steps:
main
branchb99eda0
)haxe-5-fix
instead of the version specified inhmm.json
lime test windows
:With
OCAMLRUNPARAM=b
enabled, I get:Backtrace
The text was updated successfully, but these errors were encountered: