proletariatgames / unreal.hx

Unreal.hx: Haxe Integration for Unreal
MIT License
424 stars 43 forks source link

Cppia extraClasspaths broken? #132

Open datee opened 5 years ago

datee commented 5 years ago

So testing out the latest versions it seems to be some issue with cppia compilation and extraClasspaths:

in UhxConfig.hx: config.extraStaticClasspaths = ['C:/dev/UE4Libs/haxe'];

in TestActor.hx (example)

import com.testproject.TestUtils; | | TestUtils.testFunc();

Compiling cppia only Compilation error: Type not found: com.testproject.TestUtils

Haxe/BuildTool/interp/uhx/build/MacroHelper.hx:62: Error while parsing "extraStaticClasspaths" [C:/dev/UE4Libs/haxe] : Invalid char 67 at position 1

Compiling cppia only

Static compilation works fine for all files including the ones in "script" - the problem only happens with "Compiling cppia only"

[EDIT] : I have tested this on 2 different computers - UE4.22 and UE4.21 [Windows 10] Haxe 4 rc3 / hxcpp 4.0.19 and Haxe 4 rc2 / hxcpp 4.0.8 Also happening on Haxe 3.4.7 / hxcpp 4.0.8

Same error on all tests.

datee commented 5 years ago

Just to verify : Moving the external classes to Haxe/Static fixes the error and everything compiles as normal. Any idea whats causing this @waneck ?

datee commented 5 years ago

So, since things have been quiet here for a while, i fixed this issue myself.

It seems for some reason when including an external classpath in uhxconfig like this : config.extraStaticClasspaths = ['C:/dev/UE4Libs/haxe']; the modulepaths array in uhxbuild.hx will have the string path with WITH quotes in it, thereby breaking the external classpath string. So the fix is to remove quotes from the string using a simple replace in uhxbuild.hx when the modulepath is setup ...and it compiles with no errors.

Though - that is very strange.. Not sure whats causing this. Haxe 4 issues?