HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.18k stars 655 forks source link

Genhl compiler failure when using hxb #11780

Open PXshadow opened 1 month ago

PXshadow commented 1 month ago
   | 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+dbba36c; OS type: unix;
   | File "src/generators/genhl.ml", line 764, characters 19-26
   | Called from Genhl.class_type in file "src/generators/genhl.ml", line 689, characters 95-112
   | Called from Genhl.class_global in file "src/generators/genhl.ml", line 780, characters 9-35
   | Called from Genhl.class_type in file "src/generators/genhl.ml", line 702, characters 94-152
   | Called from Genhl.get_rec_cache in file "src/generators/genhl.ml", line 378, characters 10-33
   | Called from Genhl.make_fun in file "src/generators/genhl.ml", line 3267, characters 30-53
   | Called from Genhl.generate_static.loop in file "src/generators/genhl.ml", line 3470, characters 45-126
   | Called from Stdlib__List.iter in file "list.ml", line 112, characters 12-15
   | Called from Genhl.generate_type in file "src/generators/genhl.ml", line 3547, characters 2-56
   | Called from Stdlib__List.iter in file "list.ml", line 112, characters 12-15
   | Called from Genhl.generate in file "src/generators/genhl.ml", line 4250, characters 1-24
   | Called from Generate.generate in file "src/compiler/generate.ml", line 204, characters 3-15
   | Called from Compiler.compile in file "src/compiler/compiler.ml", line 403, characters 29-64
   | Called from Compiler.compile_safe in file "src/compiler/compiler.ml", line 419, characters 1-5
   | Called from Compiler.compile_safe in file "src/compiler/compiler.ml", line 457, characters 5-23
   | Called from Compiler.compile_ctx.run in file "src/compiler/compiler.ml", line 497, characters 2-131
   | Called from Compiler.catch_completion_and_exit in file "src/compiler/compiler.ml", line 471, characters 2-9
   | Called from Compiler.HighLevel.entry.loop in file "src/compiler/compiler.ml", line 694, characters 5-43
   | Called from Compiler.HighLevel.entry in file "src/compiler/compiler.ml", line 706, characters 13-22
   | Called from Server.process in file "src/compiler/server.ml", line 803, characters 1-39
   | Called from Dune__exe__Haxe in file "src/compiler/haxe.ml", line 53, characters 0-56

Haxe: 5.0.0-alpha.1+dbba36c Hashlink: 1.13.0

Simn commented 1 month ago

Could you try that with latest? It's probably still going to fail but that way the stacktrace aligns with what I'm looking at.

PXshadow commented 1 month ago

Could you try that with latest? It's probably still going to fail but that way the stacktrace aligns with what I'm looking at.

Here you go

   | 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+1ce738c; OS type: unix;
   | File "src/generators/genhl.ml", line 773, characters 19-26
   | Called from Genhl.class_type in file "src/generators/genhl.ml", line 698, characters 95-112
   | Called from Genhl.class_global in file "src/generators/genhl.ml", line 789, characters 9-35
   | Called from Genhl.class_type in file "src/generators/genhl.ml", line 711, characters 94-152
   | Called from Genhl.get_rec_cache in file "src/generators/genhl.ml", line 380, characters 10-33
   | Called from Genhl.make_fun in file "src/generators/genhl.ml", line 3280, characters 30-53
   | Called from Genhl.generate_static.loop in file "src/generators/genhl.ml", line 3483, characters 45-126
   | Called from Stdlib__List.iter in file "list.ml", line 112, characters 12-15
   | Called from Genhl.generate_type in file "src/generators/genhl.ml", line 3560, characters 2-56
   | Called from Stdlib__List.iter in file "list.ml", line 112, characters 12-15
   | Called from Genhl.generate in file "src/generators/genhl.ml", line 4262, characters 1-24
   | Called from Generate.generate in file "src/compiler/generate.ml", line 204, characters 3-15
   | Called from Compiler.compile in file "src/compiler/compiler.ml", line 406, characters 29-64
   | Called from Compiler.compile_safe in file "src/compiler/compiler.ml", line 422, characters 1-5
   | Called from Compiler.compile_safe in file "src/compiler/compiler.ml", line 460, characters 5-23
   | Called from Compiler.compile_ctx.run in file "src/compiler/compiler.ml", line 500, characters 2-131
   | Called from Compiler.catch_completion_and_exit in file "src/compiler/compiler.ml", line 474, characters 2-9
   | Called from Compiler.HighLevel.entry.loop in file "src/compiler/compiler.ml", line 697, characters 5-43
   | Called from Compiler.HighLevel.entry in file "src/compiler/compiler.ml", line 709, characters 13-22
   | Called from Server.process in file "src/compiler/server.ml", line 803, characters 1-39
   | Called from Dune__exe__Haxe in file "src/compiler/haxe.ml", line 53, characters 0-56
   |
Simn commented 1 month ago

Thanks!

If I'm reading that correctly there's a constructor which the compiler thinks is a variable instead of a method... I do remember some similar problem related to the Var/Method confusion, but I don't think we had that happen on actual fields before. Maybe @kLabz can think of something.