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

Unsupported recursive type when importing hx.concurrent.executor.Executor #29

Open
DawDavis opened this issue Jul 17, 2024 · 1 comment

Comments

@DawDavis
Copy link

When building a haxe project that include the concurrent library against the HashLink target, I get the following error:

/haxe/lib/haxe-concurrent/5,1,3/src/hx/concurrent/Future.hx:13: characters 1-64 : Unsupported recursive type

Steps to reproduce:

Haxe-concurrent 5.1.3
Haxe 4.3.4
OS: Macosx Monterey 12.7.3

program "Main.hx"

package;

import hx.concurrent.executor.Executor;

class Main {
   public static function main() {
      var executor = Executor.create(3);
      executor.submit(()->{trace("hello.");});
   }
}

build .hxml:

-cp src
-lib haxe-concurrent
-main Main
--hl bin/main.hl

My expectation is that this is a bug with Haxe itself, however I am not familiar enough with either the library or the HashLink target to know for sure.

@sebthom
Copy link
Member

sebthom commented Jul 19, 2024

That is some kind of bug in the HashLink target and you would need to open a ticket at https://github.com/HaxeFoundation/hashlink/issues

Another project also had an issue with the same compiler error: HaxeFlixel/flixel#3149

I played around with it a bit, if I add a line like var unused:hx.concurrent.Future.FutureCompletionListener<Void> = null; to your example, it compiles.

package;

import hx.concurrent.executor.Executor;

class Main {
   public static function main() {
      var unused:hx.concurrent.Future.FutureCompletionListener<Void> = null;
      var executor = Executor.create(3);
      executor.submit(()->{trace("hello.");});
   }
}

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

No branches or pull requests

2 participants