HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.93k stars 427 forks source link

FlxTypedSignal is not found when it exists #3092

Open moxie-coder opened 3 months ago

moxie-coder commented 3 months ago

To start, I have been having this issue with the game compiling with Haxe 4.3.3, and only 4.3.3 since it doesn't seem to occur in 4.2.5, see below.


Observed behavior:

/home/moxie/haxe/lib/flixel/5,6,2/flixel/input/actions/FlxActionManager.hx:54: characters 47-96 : Type not found : FlxTypedSignal
/home/moxie/haxe/lib/flixel/5,6,2/flixel/input/gamepad/FlxGamepadManager.hx:46: characters 44-76 : Type not found : FlxTypedSignal

Was tested in Linux, but it seems to occur for Windows too, I have tried -clean or -final but both end with the same results.

Expected behavior: The game to compile.

Geokureli commented 3 months ago

are these the only 2 errors you're getting?

moxie-coder commented 3 months ago

are these the only 2 errors you're getting?

yeah

moxie-coder commented 3 months ago

wait nevermind, you can add this too

/home/moxie/haxe/lib/flixel/5,6,2/flixel/FlxCamera.hx:30: characters 31-68 : Module flixel.graphics.tile.FlxDrawQuadsItem does not define type FlxDrawQuadsItem
Geokureli commented 3 months ago

does it happen when you create a new template project? Does it happen on a flixel demo?

moxie-coder commented 3 months ago

doesn't happen for a blank project, and I'll try the demo when I can get enough space

moxie-coder commented 3 months ago

okay so uhm, I'm supposed to lime build with the demos right? because they are either taking a god awful long time to compile or nothing is actually happening

Geokureli commented 3 months ago

cpp builds take a while, try html5?

moxie-coder commented 3 months ago

cpp builds take a while, try html5?

okay sure

CyndaquilDAC commented 3 months ago

This same thing is happening to me, minus another weird error that may be my fault:

C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/group/FlxGroup.hx:68: characters 37-60 : Type not found : FlxTypedSignal C:\HaxeToolkit\haxe\std/haxe/MainLoop.hx:33: characters 50-72 : Void should be Float C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/system/frontEnds/SignalFrontEnd.hx:14: characters 43-52 : Type not found : FlxSignal

CyndaquilDAC commented 3 months ago

I tried replacing it with an older version of FlxSignal.hx, which I know worked, but now I'm getting these errors:

C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/group/FlxGroup.hx:68: characters 37-60 : Type not found : FlxTypedSignal export/windows/haxe/ApplicationMain.hx:153: characters 5-36 : ... Called from macro here C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/system/frontEnds/SignalFrontEnd.hx:14: characters 43-52 : Type not found : FlxSignal export/windows/haxe/ApplicationMain.hx:153: characters 5-36 : ... Called from macro here C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/system/frontEnds/DebuggerFrontEnd.hx:42: characters 45-54 : Type not found : FlxSignal export/windows/haxe/ApplicationMain.hx:153: characters 5-36 : ... Called from macro here C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/system/debug/FlxDebugger.hx:58: character 16 : You cannot use @:build inside a macro : make sure that your type is not used in macro export/windows/haxe/ApplicationMain.hx:153: characters 5-36 : ... Called from macro here C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/system/debug/FlxDebugger.hx:55: character 16 : You cannot use @:build inside a macro : make sure that your type is not used in macro export/windows/haxe/ApplicationMain.hx:153: characters 5-36 : ... Called from macro here C:/HaxeToolkit/haxe/lib/flixel/5,6,2/flixel/system/debug/FlxDebugger.hx:52: character 16 : You cannot use @:build inside a macro : make sure that your type is not used in macro

CyndaquilDAC commented 3 months ago

I fixed it but honestly i can't even tell how.

Geokureli commented 3 months ago

This same thing is happening to me, minus another weird error that may be my fault

the way haxe compilers work, if you have errors in your code, it may cause other files to falsely report errors, so always start with fixing any errors in your code before worrying about errors in depended libs

DetectiveBaldi commented 2 months ago

@moxie-coder Do you happen to have an import.hx file in the source code you're testing? I was working with somebody else's project and encountered the same error. I managed to fix it by wrapping the entirety of its import file in a if !macro conditional compilation block.

Geokureli commented 2 months ago

apparently people shadowing flixel files fixed this by removing the shadowing files

moxie-coder commented 2 months ago

@moxie-coder Do you happen to have an import.hx file in the source code you're testing? I was working with somebody else's project and encountered the same error. I managed to fix it by wrapping the entirety of its import file in a if !macro conditional compilation block.

I already did that, and it still happens

Geokureli commented 2 months ago

cpp builds take a while, try html5?

okay sure

did you ever try this?

apparently people shadowing flixel files fixed this by removing the shadowing files

or this?

DetectiveBaldi commented 2 months ago

Been having the same issue recently, even with only a (mostly empty) flixel tpl Haxe: 4.3.4 Flixel: 5.7.2 OpenFL: 9.3.3 Lime: 8.1.2 I've tested on HashLink and C++, and I'm not using any extra defines

moxie-coder commented 1 month ago

update: this was likely due to me shadowing 29 classes in my FNF mod so I'm just gonna go ahead and close this

Geokureli commented 1 month ago

update: this was likely due to me shadowing 29 classes in my FNF mod so I'm just gonna go ahead and close this

@moxie-coder when you feel you need to shadow a class, it would be helpful if you made a discussion about it. we may offer alternatives, or make a change that accommodates your need. if you don't tell me what problems flixel is causing you I can't do anything to help

moxie-coder commented 1 month ago

update: this was likely due to me shadowing 29 classes in my FNF mod so I'm just gonna go ahead and close this

@moxie-coder when you feel you need to shadow a class, it would be helpful if you made a discussion about it. we may offer alternatives, or make a change that accommodates your need. if you don't tell me what problems flixel is causing you I can't do anything to help

yeah good to know, I did all of that before this issue happened though so I kinda did not do that

Geokureli commented 3 weeks ago

seems people are still having this issue. does anyone have a public project that recreates this issue?